diff options
297 files changed, 7482 insertions, 36073 deletions
@@ -4,7 +4,7 @@ # http://www.gnu.org/software/autoconf -#/autom4te.cache +/autom4te.cache #/aclocal.m4 #/compile #/configure @@ -13,7 +13,7 @@ #/missing #/stamp-h1 -#/omega/autom4te.cache +/omega/autom4te.cache #/omega/aclocal.m4 #/omega/compile #/omega/depcomp diff --git a/CHiLL.pdf b/CHiLL.pdf Binary files differnew file mode 100644 index 0000000..2e10748 --- /dev/null +++ b/CHiLL.pdf diff --git a/INSTALL b/INSTALL deleted file mode 100644 index aef619a..0000000 --- a/INSTALL +++ /dev/null @@ -1,18 +0,0 @@ -BUILD -===== - -1. Edit Makefile. Change SUIFHOME and OMEGAHOME to correct paths. - -2. Do "make depend" in the chill directory. - -3. Optional, do "make clean" or "make veryclean" which removes additional - target files and flex/bison generated files. - -4. Do "make". - - -INSTALLATION -============ - -You can use CHiLL in source directory since all links are already -created in bin/, lib/ and include/ directories. diff --git a/Makefile-Old b/Makefile-Old deleted file mode 100644 index 7f2c8b5..0000000 --- a/Makefile-Old +++ /dev/null @@ -1,251 +0,0 @@ - -.SUFFIXES: -.PHONY: all depend depend-cuda-chill clean veryclean cuda-chill -.PHONY: chill - -CC = g++ -CFLAGS = -g -Wno-write-strings -DEPENDENCE_CFLAGS = -M -OMEGAHOME=./omega - -ifdef TEST_COVERAGE - CFLAGS := $(CFLAGS) -fprofile-arcs -ftest-coverage -endif - -# TODO auto-generate using config.h generated by autoconf? -CHILLVERSION = "\"0.2.0\"" -PYTHON=python #=$(shell `which python` ) -PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])") # 2.6 -PYTHONVER = python$(PYVERSION) -PYTHONINCLUDE = $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc())") -PYTHONLIBDIR = $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") -PYTHONCONFIG = $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBPL'))") -# SCRIPT_LANG = lua <-- supplied by the command line - - -# this creates a LUAHOME even if you don't have such a directory -ifeq ($(strip $(wildcard $(LUAHOME))),) -LUAHOME = $(HOME)/lua -endif -LUA_PATH = -L${LUAHOME}/lib - - -# where do include files live -INC_PATH = -I${PYTHONINCLUDE} -I${OMEGAHOME}/include -I${LUAHOME}/include - -# where do libraries live -LIB_PATH = -L${OMEGAHOME}/code_gen/obj -L${OMEGAHOME}/omega_lib/obj -# seemingly not needed -L${PYTHONCONFIG} - - - -CORE_LIBS = -lm -lcodegen -lomega -RUNNER_LIBS = -llua -ldl -lreadline -lhistory -lpthread -ldl -lutil -lm -l${PYTHONVER} - -TDLHOME = ${ROSEHOME}/libltdl - -BOOST_DATE_TIME_LIB = -lboost_date_time -BOOST_FILESYSTEM_LIB = -lboost_filesystem -BOOST_LDFLAGS = -L${BOOSTHOME}/lib -BOOST_PROGRAM_OPTIONS_LIB = -lboost_program_options -BOOST_REGEX_LIB = -lboost_regex -BOOST_SYSTEM_LIB = -lboost_system -BOOST_THREAD_LIB = -lboost_thread -BOOST_WAVE_LIB = -lboost_wave - -ROSE_LIBS = -lrose $(BOOST_LDFLAGS) $(BOOST_DATE_TIME_LIB)\ - $(BOOST_THREAD_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_PROGRAM_OPTIONS_LIB)\ - $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) \ - $(BOOST_WAVE_LIB) -lrt -ldl - - -# Source files common to both chill and cuda-chill -CORE_SRCS = dep.cc omegatools.cc irtools.cc loop.cc loop_basic.cc loop_datacopy.cc loop_unroll.cc loop_tile.cc loop_extra.cc -LIB_SRCS = $(CORE_SRCS) - -# files that will be generated by bison, flex, and make that need to be removed at clean. -GENERATED_SRCS = parser.tab.hh parser.tab.cc parse_expr.yy.cc parse_expr.ll.hh parse_expr.tab.cc parse_expr.tab.hh Makefile.deps -# object files that are specific to lua or python builds. -- This is used so that SCRIPT_LANG does not need to be specified during clean -ORPHAN_OBJS = chill_run_util.o chillmodule.o parse_expr.tab.o parse_expr.yy.o - -# files used in chill and cuda-chill interfaces -ifeq ($(SCRIPT_LANG),lua) - RUNNER_SRCS = chill_run.cc chill_env.cc -else - ifeq ($(SCRIPT_LANG),python) - RUNNER_SRCS = chill_run.cc chillmodule.cc - else - RUNNER_SRCS = chill_run.cc chill_env.cc - endif -endif - -# files used in chill but not cuda-chill -IR_CHILL_SRCS = ir_rose.cc ir_rose_utils.cc -ifeq ($(SCRIPT_LANG),lua) - YACC_SRCS = parse_expr.yy.cc parse_expr.tab.cc - CHILL_RUNNER_SRCS = chill_run_util.cc - CHILL_SRCS = $(CORE_SRCS) $(IR_CHILL_SRCS) $(CHILL_RUNNER_SRCS) $(RUNNER_SRCS) -else - ifeq ($(SCRIPT_LANG),python) - YACC_SRCS = parse_expr.yy.cc parse_expr.tab.cc - CHILL_RUNNER_SRCS = chill_run_util.cc - CHILL_SRCS = $(CORE_SRCS) $(IR_CHILL_SRCS) $(CHILL_RUNNER_SRCS) $(RUNNER_SRCS) - else - YACC_SRCS = lex.yy.cc parser.tab.cc - CHILL_RUNNER_SRCS = - CHILL_SRCS = $(CORE_SRCS) $(IR_CHILL_SRCS) $(YACC_SRCS) $(RUNNER_SRCS) - endif -endif - -# source files for cuda-chill but not chill -CUDACHILL_ONLY_SRCS = mem_mapping_utils.cc loop_cuda_rose.cc -IR_CUDACHILL_SRCS = ir_rose.cc ir_rose_utils.cc ir_cudarose.cc ir_cuda_rose_utils.cc -CUDACHILL_RUNNER_SRCS = -CUDACHILL_SRCS = $(CORE_SRCS) $(CUDACHILL_ONLY_SRCS) $(IR_CUDACHILL_SRCS) $(RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS) - -# set interface language flags -ifeq ($(SCRIPT_LANG),lua) - RUNNER_EXTRA_CFLAGS = -DLUA -else - ifeq ($(SCRIPT_LANG),python) - RUNNER_EXTRA_CFLAGS = -DPYTHON - endif -endif - -depend-cuda-chill: CFLAGS := $(CFLAGS) -DCUDACHILL -cuda-chill: CFLAGS := $(CFLAGS) -DCUDACHILL - -ALL_SRCS = $(CORE_SRCS) $(YACC_SRCS) $(IR_CHILL_SRCS) $(CUDACHILL_ONLY_SRCS) $(IR_CUDACHILL_SRCS) $(RUNNER_SRCS) $(CHILL_RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS) -ALL_OBJS = $(ALL_SRCS:.cc=.o) $(ORPHAN_OBJS) - -RUNNER_DEFINES = -DLUA_USE_LINUX -DCHILL_BUILD_VERSION=$(CHILLVERSION) -DCHILL_BUILD_DATE="\"$(CHILL_BUILD_DATE)\"" - - -YACC_EXTRA_CFLAGS = - -##################################################################### -# compiler intermediate code specific definitions -##################################################################### - - - -#LIBS := $(LIBS) $(ROSE_LIBS) -LIB_PATH := $(LIB_PATH) -L${ROSEHOME}/lib -L${TDLHOME} -#LIB_SRCS := $(LIB_SRCS) # $(IR_SRCS) -INC_PATH := $(INC_PATH) -I${ROSEHOME}/include -I${BOOSTHOME}/include -YACC_EXTRA_CFLAGS := -DBUILD_ROSE -RUNNER_EXTRA_CFLAGS := $(RUNNER_EXTRA_CFLAGS) -DBUILD_ROSE - - -##################################################################### -# build rules -##################################################################### - -YACC_OBJS = $(YACC_SRCS:.cc=.o) -RUNNER_OBJS = $(RUNNER_SRCS:.cc=.o) -CHILL_RUNNER_OBJS = $(CHILL_RUNNER_SRCS:.cc=.o) -CUDACHILL_RUNNER_OBJS = $(CUDACHILL_RUNNER_SRCS:.cc=.o) -LIB_OBJS = $(LIB_SRCS:.cc=.o) -IR_CHILL_OBJS = $(IR_CHILL_SRCS:.cc=.o) -IR_CUDACHILL_OBJS = $(IR_CUDACHILL_SRCS:.cc=.o) -CUDACHILL_ONLY_OBJS = $(CUDACHILL_ONLY_SRCS:.cc=.o) - -CHILL_OBJS = $(CHILL_SRCS:.cc=.o) -CUDACHILL_OBJS = $(CUDACHILL_SRCS:.cc=.o) - - -all: - $(MAKE) depend-chill - $(MAKE) chill - $(MAKE) depend-cuda-chill - $(MAKE) cuda-chill - - -# can't these be combined to a superset of all source files? -depend: depend-cuda-chill - -depend-chill: $(LIB_SRCS) $(RUNNER_SRCS) $(CHILL_RUNNER_SRCS) $(YACC_SRCS) - $(CC) $(DEPENDENCE_CFLAGS) $(INC_PATH) $(LIB_SRCS) $(RUNNER_SRCS) $(CHILL_RUNNER_SRCS) $(YACC_SRCS) > Makefile.deps - -depend-cuda-chill: $(LIB_SRCS) $(RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS) - $(CC) $(DEPENDENCE_CFLAGS) $(INC_PATH) $(LIB_SRCS) $(RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS) > Makefile.deps - -libchill_xform.a: $(LIB_OBJS) $(IR_CHILL_OBJS) - ar -rs $@ $(LIB_OBJS) $(IR_CHILL_OBJS) - -libcudachill_xform.a: $(LIB_OBJS) $(IR_CUDACHILL_OBJS) $(CUDACHILL_ONLY_OBJS) - ar -rs $@ $(LIB_OBJS) $(IR_CUDACHILL_OBJS) $(CUDACHILL_ONLY_OBJS) - -%.o: %.cc - $(CC) $(CFLAGS) $(INC_PATH) $< -c -o $@ - - -clean: - @rm -fr $(ALL_OBJS) $(YACC_SRCS) $(GENERATED_SRCS) - -veryclean: - @rm -fr $(ALL_OBJS) $(YACC_SRCS) libchill_xform.a libcudachill_xform.a chill cuda-chill - - -cuda-chill: libcudachill_xform.a $(CUDACHILL_RUNNER_OBJS) $(RUNNER_OBJS) - $(CC) $(CFLAGS) $(LIB_PATH) $(LUA_PATH) $(CUDACHILL_RUNNER_OBJS) $(RUNNER_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) $(RUNNER_LIBS) -o $@ - -ifeq ($(SCRIPT_LANG),lua) -chill: libchill_xform.a $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $(YACC_OBJS) - $(CC) $(CFLAGS) $(LIB_PATH) $(LUA_PATH) $(YACC_OBJS) $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) $(RUNNER_LIBS) -o $@ -else -ifeq ($(SCRIPT_LANG),python) -chill: libchill_xform.a $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $(YACC_OBJS) - $(CC) $(CFLAGS) $(LIB_PATH) $(YACC_OBJS) $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) $(RUNNER_LIBS) -o $@ - -else -chill: libchill_xform.a $(YACC_OBJS) - $(CC) $(CFLAGS) $(LIB_PATH) $(YACC_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) -o $@ -endif -endif - - -lex.yy.cc: parser.ll parser.tab.hh - flex++ parser.ll - -lex.yy.o: lex.yy.cc - $(CC) $(CFLAGS) -c $< -o $@ - -parser.tab.hh parser.tab.cc: parser.yy - bison -t -d $< - -parser.tab.o: parser.tab.cc - $(CC) $(CFLAGS) $(YACC_EXTRA_CFLAGS) $(INC_PATH) -DCHILL_BUILD_DATE="\"$(CHILL_BUILD_DATE)\"" -c $< -o $@ - - -parse_expr.tab.cc: parse_expr.yy - bison -t -d parse_expr.yy - -parse_expr.tab.o: parse_expr.tab.cc - $(CC) $(CFLAGS) $(YACC_CFLAGS) $(INC_PATH) -o $@ -c parse_expr.tab.cc - -parse_expr.yy.cc: parse_expr.tab.cc parse_expr.ll - flex -o parse_expr.yy.cc parse_expr.ll - -parse_expr.yy.o: parse_expr.yy.cc - $(CC) $(CFLAGS) $(YACC_CFLAGS) $(INC_PATH) -o $@ -c parse_expr.yy.cc - -$(RUNNER_SRCS:.cc=.o): %.o: %.cc - $(CC) $(CFLAGS) $(RUNNER_EXTRA_CFLAGS) $(INC_PATH) $(RUNNER_DEFINES) $< -c -o $@ - -$(CHILL_RUNNER_SRCS:.cc=.o): %.o: %.cc - $(CC) $(CFLAGS) $(RUNNER_EXTRA_CFLAGS) $(INC_PATH) $(RUNNER_DEFINES) $< -c -o $@ - -$(CUDACHILL_RUNNER_SRCS:.cc=.o): %.o %.cc - $(CC) $(CFLAGS) $(RUNNER_EXTRA_CFLAGS) $(INC_PATH) $(RUNNER_DEFINES) $< -c -o $@ - - -$(IR_SRCS:.cc=.o): %.o: %.cc - $(CC) -Wno-write-strings $(CFLAGS) $(INC_PATH) $< -c -o $@ - -ifeq ($(shell test -f Makefile.deps && echo "true"), true) -include Makefile.deps -endif - -CHILL_BUILD_DATE = $(shell date +%m/%d/%Y) - diff --git a/Makefile.in b/Makefile.in index 6da134b..444d53d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,57 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -37,21 +79,21 @@ POST_UNINSTALL = : @CUDACHILL_OPT_FALSE@bin_PROGRAMS = chill$(EXEEXT) @CUDACHILL_OPT_TRUE@bin_PROGRAMS = cudachill$(EXEEXT) subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure \ - $(top_srcdir)/include/config.h.in INSTALL depcomp install-sh \ - missing +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(top_srcdir)/include/config.h.in depcomp README compile \ + install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__chill_SOURCES_DIST = dep.cc irtools.cc loop.cc loop_basic.cc \ loop_datacopy.cc loop_extra.cc loop_tile.cc loop_unroll.cc \ @@ -82,6 +124,8 @@ chill_OBJECTS = $(am_chill_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) chill_DEPENDENCIES = $(am__DEPENDENCIES_2) +chill_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(chill_LDFLAGS) \ + $(LDFLAGS) -o $@ am__cudachill_SOURCES_DIST = dep.cc irtools.cc loop.cc loop_basic.cc \ loop_datacopy.cc loop_extra.cc loop_tile.cc loop_unroll.cc \ omegatools.cc chill_run.cc chill_run_util.cc chill_env.cc \ @@ -114,40 +158,130 @@ am_cudachill_OBJECTS = $(am__objects_9) $(am__objects_13) \ $(am__objects_14) $(am__objects_15) cudachill_OBJECTS = $(am_cudachill_OBJECTS) cudachill_DEPENDENCIES = $(am__DEPENDENCIES_2) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include +cudachill_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(cudachill_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(chill_SOURCES) $(cudachill_SOURCES) DIST_SOURCES = $(am__chill_SOURCES_DIST) $(am__cudachill_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -159,8 +293,6 @@ CCLD = @CCLD@ CFLAGS = @CFLAGS@ CHILL_BUILD_VERSION = @CHILL_BUILD_VERSION@ CPPFLAGS = @CPPFLAGS@ -CUDACHILL_OPT_FALSE = @CUDACHILL_OPT_FALSE@ -CUDACHILL_OPT_TRUE = @CUDACHILL_OPT_TRUE@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ @@ -171,6 +303,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -183,9 +316,8 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ LUAHOME = @LUAHOME@ -LUA_OPT_FALSE = @LUA_OPT_FALSE@ -LUA_OPT_TRUE = @LUA_OPT_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OMEGAHOME = @OMEGAHOME@ PACKAGE = @PACKAGE@ @@ -200,8 +332,6 @@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCDIR = @PYTHON_INCDIR@ PYTHON_LIBDIR = @PYTHON_LIBDIR@ -PYTHON_OPT_FALSE = @PYTHON_OPT_FALSE@ -PYTHON_OPT_TRUE = @PYTHON_OPT_TRUE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ @@ -213,12 +343,12 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -226,6 +356,7 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -257,9 +388,13 @@ python_builds = @python_builds@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ use_lua = @use_lua@ use_python = @use_python@ SUBDIRS = omega/omega_lib/obj omega/code_gen/obj @@ -345,21 +480,21 @@ all: $(BUILT_SOURCES) .SUFFIXES: .SUFFIXES: .cc .o .obj -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -375,21 +510,20 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): include/config.h: include/stamp-h1 - @if test ! -f $@; then \ - rm -f include/stamp-h1; \ - $(MAKE) include/stamp-h1; \ - else :; fi + @test -f $@ || rm -f include/stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1 include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status @rm -f include/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(top_srcdir)/include/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/stamp-h1 touch $@ @@ -397,33 +531,54 @@ distclean-hdr: -rm -f include/config.h include/stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -chill$(EXEEXT): $(chill_OBJECTS) $(chill_DEPENDENCIES) + +chill$(EXEEXT): $(chill_OBJECTS) $(chill_DEPENDENCIES) $(EXTRA_chill_DEPENDENCIES) @rm -f chill$(EXEEXT) - $(CXXLINK) $(chill_LDFLAGS) $(chill_OBJECTS) $(chill_LDADD) $(LIBS) -cudachill$(EXEEXT): $(cudachill_OBJECTS) $(cudachill_DEPENDENCIES) + $(AM_V_CXXLD)$(chill_LINK) $(chill_OBJECTS) $(chill_LDADD) $(LIBS) + +cudachill$(EXEEXT): $(cudachill_OBJECTS) $(cudachill_DEPENDENCIES) $(EXTRA_cudachill_DEPENDENCIES) @rm -f cudachill$(EXEEXT) - $(CXXLINK) $(cudachill_LDFLAGS) $(cudachill_OBJECTS) $(cudachill_LDADD) $(LIBS) + $(AM_V_CXXLD)$(cudachill_LINK) $(cudachill_OBJECTS) $(cudachill_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -473,597 +628,601 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cudachill-parse_expr.yy.Po@am__quote@ .cc.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` chill-dep.o: dep.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-dep.o -MD -MP -MF "$(DEPDIR)/chill-dep.Tpo" -c -o chill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-dep.Tpo" "$(DEPDIR)/chill-dep.Po"; else rm -f "$(DEPDIR)/chill-dep.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dep.cc' object='chill-dep.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-dep.o -MD -MP -MF $(DEPDIR)/chill-dep.Tpo -c -o chill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-dep.Tpo $(DEPDIR)/chill-dep.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dep.cc' object='chill-dep.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc chill-dep.obj: dep.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-dep.obj -MD -MP -MF "$(DEPDIR)/chill-dep.Tpo" -c -o chill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-dep.Tpo" "$(DEPDIR)/chill-dep.Po"; else rm -f "$(DEPDIR)/chill-dep.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dep.cc' object='chill-dep.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-dep.obj -MD -MP -MF $(DEPDIR)/chill-dep.Tpo -c -o chill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-dep.Tpo $(DEPDIR)/chill-dep.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dep.cc' object='chill-dep.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi` chill-irtools.o: irtools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-irtools.o -MD -MP -MF "$(DEPDIR)/chill-irtools.Tpo" -c -o chill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-irtools.Tpo" "$(DEPDIR)/chill-irtools.Po"; else rm -f "$(DEPDIR)/chill-irtools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='irtools.cc' object='chill-irtools.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-irtools.o -MD -MP -MF $(DEPDIR)/chill-irtools.Tpo -c -o chill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-irtools.Tpo $(DEPDIR)/chill-irtools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='irtools.cc' object='chill-irtools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc chill-irtools.obj: irtools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-irtools.obj -MD -MP -MF "$(DEPDIR)/chill-irtools.Tpo" -c -o chill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-irtools.Tpo" "$(DEPDIR)/chill-irtools.Po"; else rm -f "$(DEPDIR)/chill-irtools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='irtools.cc' object='chill-irtools.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-irtools.obj -MD -MP -MF $(DEPDIR)/chill-irtools.Tpo -c -o chill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-irtools.Tpo $(DEPDIR)/chill-irtools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='irtools.cc' object='chill-irtools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi` chill-loop.o: loop.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop.o -MD -MP -MF "$(DEPDIR)/chill-loop.Tpo" -c -o chill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop.Tpo" "$(DEPDIR)/chill-loop.Po"; else rm -f "$(DEPDIR)/chill-loop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop.cc' object='chill-loop.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop.o -MD -MP -MF $(DEPDIR)/chill-loop.Tpo -c -o chill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop.Tpo $(DEPDIR)/chill-loop.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop.cc' object='chill-loop.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc chill-loop.obj: loop.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop.obj -MD -MP -MF "$(DEPDIR)/chill-loop.Tpo" -c -o chill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop.Tpo" "$(DEPDIR)/chill-loop.Po"; else rm -f "$(DEPDIR)/chill-loop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop.cc' object='chill-loop.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop.obj -MD -MP -MF $(DEPDIR)/chill-loop.Tpo -c -o chill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop.Tpo $(DEPDIR)/chill-loop.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop.cc' object='chill-loop.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi` chill-loop_basic.o: loop_basic.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_basic.o -MD -MP -MF "$(DEPDIR)/chill-loop_basic.Tpo" -c -o chill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_basic.Tpo" "$(DEPDIR)/chill-loop_basic.Po"; else rm -f "$(DEPDIR)/chill-loop_basic.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_basic.cc' object='chill-loop_basic.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_basic.o -MD -MP -MF $(DEPDIR)/chill-loop_basic.Tpo -c -o chill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_basic.Tpo $(DEPDIR)/chill-loop_basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_basic.cc' object='chill-loop_basic.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc chill-loop_basic.obj: loop_basic.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_basic.obj -MD -MP -MF "$(DEPDIR)/chill-loop_basic.Tpo" -c -o chill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_basic.Tpo" "$(DEPDIR)/chill-loop_basic.Po"; else rm -f "$(DEPDIR)/chill-loop_basic.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_basic.cc' object='chill-loop_basic.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_basic.obj -MD -MP -MF $(DEPDIR)/chill-loop_basic.Tpo -c -o chill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_basic.Tpo $(DEPDIR)/chill-loop_basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_basic.cc' object='chill-loop_basic.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi` chill-loop_datacopy.o: loop_datacopy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_datacopy.o -MD -MP -MF "$(DEPDIR)/chill-loop_datacopy.Tpo" -c -o chill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_datacopy.Tpo" "$(DEPDIR)/chill-loop_datacopy.Po"; else rm -f "$(DEPDIR)/chill-loop_datacopy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_datacopy.cc' object='chill-loop_datacopy.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_datacopy.o -MD -MP -MF $(DEPDIR)/chill-loop_datacopy.Tpo -c -o chill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_datacopy.Tpo $(DEPDIR)/chill-loop_datacopy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_datacopy.cc' object='chill-loop_datacopy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc chill-loop_datacopy.obj: loop_datacopy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_datacopy.obj -MD -MP -MF "$(DEPDIR)/chill-loop_datacopy.Tpo" -c -o chill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_datacopy.Tpo" "$(DEPDIR)/chill-loop_datacopy.Po"; else rm -f "$(DEPDIR)/chill-loop_datacopy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_datacopy.cc' object='chill-loop_datacopy.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_datacopy.obj -MD -MP -MF $(DEPDIR)/chill-loop_datacopy.Tpo -c -o chill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_datacopy.Tpo $(DEPDIR)/chill-loop_datacopy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_datacopy.cc' object='chill-loop_datacopy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi` chill-loop_extra.o: loop_extra.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_extra.o -MD -MP -MF "$(DEPDIR)/chill-loop_extra.Tpo" -c -o chill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_extra.Tpo" "$(DEPDIR)/chill-loop_extra.Po"; else rm -f "$(DEPDIR)/chill-loop_extra.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_extra.cc' object='chill-loop_extra.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_extra.o -MD -MP -MF $(DEPDIR)/chill-loop_extra.Tpo -c -o chill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_extra.Tpo $(DEPDIR)/chill-loop_extra.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_extra.cc' object='chill-loop_extra.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc chill-loop_extra.obj: loop_extra.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_extra.obj -MD -MP -MF "$(DEPDIR)/chill-loop_extra.Tpo" -c -o chill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_extra.Tpo" "$(DEPDIR)/chill-loop_extra.Po"; else rm -f "$(DEPDIR)/chill-loop_extra.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_extra.cc' object='chill-loop_extra.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_extra.obj -MD -MP -MF $(DEPDIR)/chill-loop_extra.Tpo -c -o chill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_extra.Tpo $(DEPDIR)/chill-loop_extra.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_extra.cc' object='chill-loop_extra.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi` chill-loop_tile.o: loop_tile.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_tile.o -MD -MP -MF "$(DEPDIR)/chill-loop_tile.Tpo" -c -o chill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_tile.Tpo" "$(DEPDIR)/chill-loop_tile.Po"; else rm -f "$(DEPDIR)/chill-loop_tile.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_tile.cc' object='chill-loop_tile.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_tile.o -MD -MP -MF $(DEPDIR)/chill-loop_tile.Tpo -c -o chill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_tile.Tpo $(DEPDIR)/chill-loop_tile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_tile.cc' object='chill-loop_tile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc chill-loop_tile.obj: loop_tile.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_tile.obj -MD -MP -MF "$(DEPDIR)/chill-loop_tile.Tpo" -c -o chill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_tile.Tpo" "$(DEPDIR)/chill-loop_tile.Po"; else rm -f "$(DEPDIR)/chill-loop_tile.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_tile.cc' object='chill-loop_tile.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_tile.obj -MD -MP -MF $(DEPDIR)/chill-loop_tile.Tpo -c -o chill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_tile.Tpo $(DEPDIR)/chill-loop_tile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_tile.cc' object='chill-loop_tile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi` chill-loop_unroll.o: loop_unroll.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_unroll.o -MD -MP -MF "$(DEPDIR)/chill-loop_unroll.Tpo" -c -o chill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_unroll.Tpo" "$(DEPDIR)/chill-loop_unroll.Po"; else rm -f "$(DEPDIR)/chill-loop_unroll.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_unroll.cc' object='chill-loop_unroll.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_unroll.o -MD -MP -MF $(DEPDIR)/chill-loop_unroll.Tpo -c -o chill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_unroll.Tpo $(DEPDIR)/chill-loop_unroll.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_unroll.cc' object='chill-loop_unroll.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc chill-loop_unroll.obj: loop_unroll.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_unroll.obj -MD -MP -MF "$(DEPDIR)/chill-loop_unroll.Tpo" -c -o chill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-loop_unroll.Tpo" "$(DEPDIR)/chill-loop_unroll.Po"; else rm -f "$(DEPDIR)/chill-loop_unroll.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_unroll.cc' object='chill-loop_unroll.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-loop_unroll.obj -MD -MP -MF $(DEPDIR)/chill-loop_unroll.Tpo -c -o chill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-loop_unroll.Tpo $(DEPDIR)/chill-loop_unroll.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_unroll.cc' object='chill-loop_unroll.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi` chill-omegatools.o: omegatools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-omegatools.o -MD -MP -MF "$(DEPDIR)/chill-omegatools.Tpo" -c -o chill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-omegatools.Tpo" "$(DEPDIR)/chill-omegatools.Po"; else rm -f "$(DEPDIR)/chill-omegatools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='omegatools.cc' object='chill-omegatools.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-omegatools.o -MD -MP -MF $(DEPDIR)/chill-omegatools.Tpo -c -o chill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-omegatools.Tpo $(DEPDIR)/chill-omegatools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='omegatools.cc' object='chill-omegatools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc chill-omegatools.obj: omegatools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-omegatools.obj -MD -MP -MF "$(DEPDIR)/chill-omegatools.Tpo" -c -o chill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-omegatools.Tpo" "$(DEPDIR)/chill-omegatools.Po"; else rm -f "$(DEPDIR)/chill-omegatools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='omegatools.cc' object='chill-omegatools.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-omegatools.obj -MD -MP -MF $(DEPDIR)/chill-omegatools.Tpo -c -o chill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-omegatools.Tpo $(DEPDIR)/chill-omegatools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='omegatools.cc' object='chill-omegatools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi` chill-lex.yy.o: lex.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-lex.yy.o -MD -MP -MF "$(DEPDIR)/chill-lex.yy.Tpo" -c -o chill-lex.yy.o `test -f 'lex.yy.cc' || echo '$(srcdir)/'`lex.yy.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-lex.yy.Tpo" "$(DEPDIR)/chill-lex.yy.Po"; else rm -f "$(DEPDIR)/chill-lex.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lex.yy.cc' object='chill-lex.yy.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-lex.yy.o -MD -MP -MF $(DEPDIR)/chill-lex.yy.Tpo -c -o chill-lex.yy.o `test -f 'lex.yy.cc' || echo '$(srcdir)/'`lex.yy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-lex.yy.Tpo $(DEPDIR)/chill-lex.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='lex.yy.cc' object='chill-lex.yy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-lex.yy.o `test -f 'lex.yy.cc' || echo '$(srcdir)/'`lex.yy.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-lex.yy.o `test -f 'lex.yy.cc' || echo '$(srcdir)/'`lex.yy.cc chill-lex.yy.obj: lex.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-lex.yy.obj -MD -MP -MF "$(DEPDIR)/chill-lex.yy.Tpo" -c -o chill-lex.yy.obj `if test -f 'lex.yy.cc'; then $(CYGPATH_W) 'lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/lex.yy.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-lex.yy.Tpo" "$(DEPDIR)/chill-lex.yy.Po"; else rm -f "$(DEPDIR)/chill-lex.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lex.yy.cc' object='chill-lex.yy.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-lex.yy.obj -MD -MP -MF $(DEPDIR)/chill-lex.yy.Tpo -c -o chill-lex.yy.obj `if test -f 'lex.yy.cc'; then $(CYGPATH_W) 'lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/lex.yy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-lex.yy.Tpo $(DEPDIR)/chill-lex.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='lex.yy.cc' object='chill-lex.yy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-lex.yy.obj `if test -f 'lex.yy.cc'; then $(CYGPATH_W) 'lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/lex.yy.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-lex.yy.obj `if test -f 'lex.yy.cc'; then $(CYGPATH_W) 'lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/lex.yy.cc'; fi` chill-parser.tab.o: parser.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parser.tab.o -MD -MP -MF "$(DEPDIR)/chill-parser.tab.Tpo" -c -o chill-parser.tab.o `test -f 'parser.tab.cc' || echo '$(srcdir)/'`parser.tab.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-parser.tab.Tpo" "$(DEPDIR)/chill-parser.tab.Po"; else rm -f "$(DEPDIR)/chill-parser.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.tab.cc' object='chill-parser.tab.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parser.tab.o -MD -MP -MF $(DEPDIR)/chill-parser.tab.Tpo -c -o chill-parser.tab.o `test -f 'parser.tab.cc' || echo '$(srcdir)/'`parser.tab.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-parser.tab.Tpo $(DEPDIR)/chill-parser.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parser.tab.cc' object='chill-parser.tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parser.tab.o `test -f 'parser.tab.cc' || echo '$(srcdir)/'`parser.tab.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parser.tab.o `test -f 'parser.tab.cc' || echo '$(srcdir)/'`parser.tab.cc chill-parser.tab.obj: parser.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parser.tab.obj -MD -MP -MF "$(DEPDIR)/chill-parser.tab.Tpo" -c -o chill-parser.tab.obj `if test -f 'parser.tab.cc'; then $(CYGPATH_W) 'parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parser.tab.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-parser.tab.Tpo" "$(DEPDIR)/chill-parser.tab.Po"; else rm -f "$(DEPDIR)/chill-parser.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.tab.cc' object='chill-parser.tab.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parser.tab.obj -MD -MP -MF $(DEPDIR)/chill-parser.tab.Tpo -c -o chill-parser.tab.obj `if test -f 'parser.tab.cc'; then $(CYGPATH_W) 'parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parser.tab.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-parser.tab.Tpo $(DEPDIR)/chill-parser.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parser.tab.cc' object='chill-parser.tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parser.tab.obj `if test -f 'parser.tab.cc'; then $(CYGPATH_W) 'parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parser.tab.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parser.tab.obj `if test -f 'parser.tab.cc'; then $(CYGPATH_W) 'parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parser.tab.cc'; fi` chill-chill_run.o: chill_run.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run.o -MD -MP -MF "$(DEPDIR)/chill-chill_run.Tpo" -c -o chill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chill_run.Tpo" "$(DEPDIR)/chill-chill_run.Po"; else rm -f "$(DEPDIR)/chill-chill_run.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run.cc' object='chill-chill_run.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run.o -MD -MP -MF $(DEPDIR)/chill-chill_run.Tpo -c -o chill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chill_run.Tpo $(DEPDIR)/chill-chill_run.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run.cc' object='chill-chill_run.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc chill-chill_run.obj: chill_run.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run.obj -MD -MP -MF "$(DEPDIR)/chill-chill_run.Tpo" -c -o chill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chill_run.Tpo" "$(DEPDIR)/chill-chill_run.Po"; else rm -f "$(DEPDIR)/chill-chill_run.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run.cc' object='chill-chill_run.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run.obj -MD -MP -MF $(DEPDIR)/chill-chill_run.Tpo -c -o chill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chill_run.Tpo $(DEPDIR)/chill-chill_run.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run.cc' object='chill-chill_run.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi` chill-chill_run_util.o: chill_run_util.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run_util.o -MD -MP -MF "$(DEPDIR)/chill-chill_run_util.Tpo" -c -o chill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chill_run_util.Tpo" "$(DEPDIR)/chill-chill_run_util.Po"; else rm -f "$(DEPDIR)/chill-chill_run_util.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run_util.cc' object='chill-chill_run_util.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run_util.o -MD -MP -MF $(DEPDIR)/chill-chill_run_util.Tpo -c -o chill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chill_run_util.Tpo $(DEPDIR)/chill-chill_run_util.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run_util.cc' object='chill-chill_run_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc chill-chill_run_util.obj: chill_run_util.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run_util.obj -MD -MP -MF "$(DEPDIR)/chill-chill_run_util.Tpo" -c -o chill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chill_run_util.Tpo" "$(DEPDIR)/chill-chill_run_util.Po"; else rm -f "$(DEPDIR)/chill-chill_run_util.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run_util.cc' object='chill-chill_run_util.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_run_util.obj -MD -MP -MF $(DEPDIR)/chill-chill_run_util.Tpo -c -o chill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chill_run_util.Tpo $(DEPDIR)/chill-chill_run_util.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run_util.cc' object='chill-chill_run_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi` chill-chill_env.o: chill_env.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_env.o -MD -MP -MF "$(DEPDIR)/chill-chill_env.Tpo" -c -o chill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chill_env.Tpo" "$(DEPDIR)/chill-chill_env.Po"; else rm -f "$(DEPDIR)/chill-chill_env.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_env.cc' object='chill-chill_env.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_env.o -MD -MP -MF $(DEPDIR)/chill-chill_env.Tpo -c -o chill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chill_env.Tpo $(DEPDIR)/chill-chill_env.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_env.cc' object='chill-chill_env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc chill-chill_env.obj: chill_env.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_env.obj -MD -MP -MF "$(DEPDIR)/chill-chill_env.Tpo" -c -o chill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chill_env.Tpo" "$(DEPDIR)/chill-chill_env.Po"; else rm -f "$(DEPDIR)/chill-chill_env.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_env.cc' object='chill-chill_env.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chill_env.obj -MD -MP -MF $(DEPDIR)/chill-chill_env.Tpo -c -o chill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chill_env.Tpo $(DEPDIR)/chill-chill_env.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_env.cc' object='chill-chill_env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi` chill-parse_expr.yy.o: parse_expr.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.yy.o -MD -MP -MF "$(DEPDIR)/chill-parse_expr.yy.Tpo" -c -o chill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-parse_expr.yy.Tpo" "$(DEPDIR)/chill-parse_expr.yy.Po"; else rm -f "$(DEPDIR)/chill-parse_expr.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.yy.cc' object='chill-parse_expr.yy.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.yy.o -MD -MP -MF $(DEPDIR)/chill-parse_expr.yy.Tpo -c -o chill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-parse_expr.yy.Tpo $(DEPDIR)/chill-parse_expr.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.yy.cc' object='chill-parse_expr.yy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc chill-parse_expr.yy.obj: parse_expr.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.yy.obj -MD -MP -MF "$(DEPDIR)/chill-parse_expr.yy.Tpo" -c -o chill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-parse_expr.yy.Tpo" "$(DEPDIR)/chill-parse_expr.yy.Po"; else rm -f "$(DEPDIR)/chill-parse_expr.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.yy.cc' object='chill-parse_expr.yy.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.yy.obj -MD -MP -MF $(DEPDIR)/chill-parse_expr.yy.Tpo -c -o chill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-parse_expr.yy.Tpo $(DEPDIR)/chill-parse_expr.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.yy.cc' object='chill-parse_expr.yy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi` chill-parse_expr.tab.o: parse_expr.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.tab.o -MD -MP -MF "$(DEPDIR)/chill-parse_expr.tab.Tpo" -c -o chill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-parse_expr.tab.Tpo" "$(DEPDIR)/chill-parse_expr.tab.Po"; else rm -f "$(DEPDIR)/chill-parse_expr.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.tab.cc' object='chill-parse_expr.tab.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.tab.o -MD -MP -MF $(DEPDIR)/chill-parse_expr.tab.Tpo -c -o chill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-parse_expr.tab.Tpo $(DEPDIR)/chill-parse_expr.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.tab.cc' object='chill-parse_expr.tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc chill-parse_expr.tab.obj: parse_expr.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.tab.obj -MD -MP -MF "$(DEPDIR)/chill-parse_expr.tab.Tpo" -c -o chill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-parse_expr.tab.Tpo" "$(DEPDIR)/chill-parse_expr.tab.Po"; else rm -f "$(DEPDIR)/chill-parse_expr.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.tab.cc' object='chill-parse_expr.tab.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-parse_expr.tab.obj -MD -MP -MF $(DEPDIR)/chill-parse_expr.tab.Tpo -c -o chill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-parse_expr.tab.Tpo $(DEPDIR)/chill-parse_expr.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.tab.cc' object='chill-parse_expr.tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi` chill-chillmodule.o: chillmodule.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chillmodule.o -MD -MP -MF "$(DEPDIR)/chill-chillmodule.Tpo" -c -o chill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chillmodule.Tpo" "$(DEPDIR)/chill-chillmodule.Po"; else rm -f "$(DEPDIR)/chill-chillmodule.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chillmodule.cc' object='chill-chillmodule.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chillmodule.o -MD -MP -MF $(DEPDIR)/chill-chillmodule.Tpo -c -o chill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chillmodule.Tpo $(DEPDIR)/chill-chillmodule.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chillmodule.cc' object='chill-chillmodule.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc chill-chillmodule.obj: chillmodule.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chillmodule.obj -MD -MP -MF "$(DEPDIR)/chill-chillmodule.Tpo" -c -o chill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-chillmodule.Tpo" "$(DEPDIR)/chill-chillmodule.Po"; else rm -f "$(DEPDIR)/chill-chillmodule.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chillmodule.cc' object='chill-chillmodule.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-chillmodule.obj -MD -MP -MF $(DEPDIR)/chill-chillmodule.Tpo -c -o chill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-chillmodule.Tpo $(DEPDIR)/chill-chillmodule.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chillmodule.cc' object='chill-chillmodule.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi` chill-ir_rose.o: ir_rose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose.o -MD -MP -MF "$(DEPDIR)/chill-ir_rose.Tpo" -c -o chill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-ir_rose.Tpo" "$(DEPDIR)/chill-ir_rose.Po"; else rm -f "$(DEPDIR)/chill-ir_rose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose.cc' object='chill-ir_rose.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose.o -MD -MP -MF $(DEPDIR)/chill-ir_rose.Tpo -c -o chill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-ir_rose.Tpo $(DEPDIR)/chill-ir_rose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose.cc' object='chill-ir_rose.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc chill-ir_rose.obj: ir_rose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose.obj -MD -MP -MF "$(DEPDIR)/chill-ir_rose.Tpo" -c -o chill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-ir_rose.Tpo" "$(DEPDIR)/chill-ir_rose.Po"; else rm -f "$(DEPDIR)/chill-ir_rose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose.cc' object='chill-ir_rose.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose.obj -MD -MP -MF $(DEPDIR)/chill-ir_rose.Tpo -c -o chill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-ir_rose.Tpo $(DEPDIR)/chill-ir_rose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose.cc' object='chill-ir_rose.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi` chill-ir_rose_utils.o: ir_rose_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose_utils.o -MD -MP -MF "$(DEPDIR)/chill-ir_rose_utils.Tpo" -c -o chill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-ir_rose_utils.Tpo" "$(DEPDIR)/chill-ir_rose_utils.Po"; else rm -f "$(DEPDIR)/chill-ir_rose_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose_utils.cc' object='chill-ir_rose_utils.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose_utils.o -MD -MP -MF $(DEPDIR)/chill-ir_rose_utils.Tpo -c -o chill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-ir_rose_utils.Tpo $(DEPDIR)/chill-ir_rose_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose_utils.cc' object='chill-ir_rose_utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc chill-ir_rose_utils.obj: ir_rose_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose_utils.obj -MD -MP -MF "$(DEPDIR)/chill-ir_rose_utils.Tpo" -c -o chill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/chill-ir_rose_utils.Tpo" "$(DEPDIR)/chill-ir_rose_utils.Po"; else rm -f "$(DEPDIR)/chill-ir_rose_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose_utils.cc' object='chill-ir_rose_utils.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT chill-ir_rose_utils.obj -MD -MP -MF $(DEPDIR)/chill-ir_rose_utils.Tpo -c -o chill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/chill-ir_rose_utils.Tpo $(DEPDIR)/chill-ir_rose_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose_utils.cc' object='chill-ir_rose_utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o chill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi` cudachill-dep.o: dep.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-dep.o -MD -MP -MF "$(DEPDIR)/cudachill-dep.Tpo" -c -o cudachill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-dep.Tpo" "$(DEPDIR)/cudachill-dep.Po"; else rm -f "$(DEPDIR)/cudachill-dep.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dep.cc' object='cudachill-dep.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-dep.o -MD -MP -MF $(DEPDIR)/cudachill-dep.Tpo -c -o cudachill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-dep.Tpo $(DEPDIR)/cudachill-dep.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dep.cc' object='cudachill-dep.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-dep.o `test -f 'dep.cc' || echo '$(srcdir)/'`dep.cc cudachill-dep.obj: dep.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-dep.obj -MD -MP -MF "$(DEPDIR)/cudachill-dep.Tpo" -c -o cudachill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-dep.Tpo" "$(DEPDIR)/cudachill-dep.Po"; else rm -f "$(DEPDIR)/cudachill-dep.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dep.cc' object='cudachill-dep.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-dep.obj -MD -MP -MF $(DEPDIR)/cudachill-dep.Tpo -c -o cudachill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-dep.Tpo $(DEPDIR)/cudachill-dep.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dep.cc' object='cudachill-dep.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-dep.obj `if test -f 'dep.cc'; then $(CYGPATH_W) 'dep.cc'; else $(CYGPATH_W) '$(srcdir)/dep.cc'; fi` cudachill-irtools.o: irtools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-irtools.o -MD -MP -MF "$(DEPDIR)/cudachill-irtools.Tpo" -c -o cudachill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-irtools.Tpo" "$(DEPDIR)/cudachill-irtools.Po"; else rm -f "$(DEPDIR)/cudachill-irtools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='irtools.cc' object='cudachill-irtools.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-irtools.o -MD -MP -MF $(DEPDIR)/cudachill-irtools.Tpo -c -o cudachill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-irtools.Tpo $(DEPDIR)/cudachill-irtools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='irtools.cc' object='cudachill-irtools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-irtools.o `test -f 'irtools.cc' || echo '$(srcdir)/'`irtools.cc cudachill-irtools.obj: irtools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-irtools.obj -MD -MP -MF "$(DEPDIR)/cudachill-irtools.Tpo" -c -o cudachill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-irtools.Tpo" "$(DEPDIR)/cudachill-irtools.Po"; else rm -f "$(DEPDIR)/cudachill-irtools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='irtools.cc' object='cudachill-irtools.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-irtools.obj -MD -MP -MF $(DEPDIR)/cudachill-irtools.Tpo -c -o cudachill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-irtools.Tpo $(DEPDIR)/cudachill-irtools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='irtools.cc' object='cudachill-irtools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-irtools.obj `if test -f 'irtools.cc'; then $(CYGPATH_W) 'irtools.cc'; else $(CYGPATH_W) '$(srcdir)/irtools.cc'; fi` cudachill-loop.o: loop.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop.o -MD -MP -MF "$(DEPDIR)/cudachill-loop.Tpo" -c -o cudachill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop.Tpo" "$(DEPDIR)/cudachill-loop.Po"; else rm -f "$(DEPDIR)/cudachill-loop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop.cc' object='cudachill-loop.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop.o -MD -MP -MF $(DEPDIR)/cudachill-loop.Tpo -c -o cudachill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop.Tpo $(DEPDIR)/cudachill-loop.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop.cc' object='cudachill-loop.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop.o `test -f 'loop.cc' || echo '$(srcdir)/'`loop.cc cudachill-loop.obj: loop.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop.obj -MD -MP -MF "$(DEPDIR)/cudachill-loop.Tpo" -c -o cudachill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop.Tpo" "$(DEPDIR)/cudachill-loop.Po"; else rm -f "$(DEPDIR)/cudachill-loop.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop.cc' object='cudachill-loop.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop.obj -MD -MP -MF $(DEPDIR)/cudachill-loop.Tpo -c -o cudachill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop.Tpo $(DEPDIR)/cudachill-loop.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop.cc' object='cudachill-loop.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop.obj `if test -f 'loop.cc'; then $(CYGPATH_W) 'loop.cc'; else $(CYGPATH_W) '$(srcdir)/loop.cc'; fi` cudachill-loop_basic.o: loop_basic.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_basic.o -MD -MP -MF "$(DEPDIR)/cudachill-loop_basic.Tpo" -c -o cudachill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_basic.Tpo" "$(DEPDIR)/cudachill-loop_basic.Po"; else rm -f "$(DEPDIR)/cudachill-loop_basic.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_basic.cc' object='cudachill-loop_basic.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_basic.o -MD -MP -MF $(DEPDIR)/cudachill-loop_basic.Tpo -c -o cudachill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_basic.Tpo $(DEPDIR)/cudachill-loop_basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_basic.cc' object='cudachill-loop_basic.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_basic.o `test -f 'loop_basic.cc' || echo '$(srcdir)/'`loop_basic.cc cudachill-loop_basic.obj: loop_basic.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_basic.obj -MD -MP -MF "$(DEPDIR)/cudachill-loop_basic.Tpo" -c -o cudachill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_basic.Tpo" "$(DEPDIR)/cudachill-loop_basic.Po"; else rm -f "$(DEPDIR)/cudachill-loop_basic.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_basic.cc' object='cudachill-loop_basic.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_basic.obj -MD -MP -MF $(DEPDIR)/cudachill-loop_basic.Tpo -c -o cudachill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_basic.Tpo $(DEPDIR)/cudachill-loop_basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_basic.cc' object='cudachill-loop_basic.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_basic.obj `if test -f 'loop_basic.cc'; then $(CYGPATH_W) 'loop_basic.cc'; else $(CYGPATH_W) '$(srcdir)/loop_basic.cc'; fi` cudachill-loop_datacopy.o: loop_datacopy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_datacopy.o -MD -MP -MF "$(DEPDIR)/cudachill-loop_datacopy.Tpo" -c -o cudachill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_datacopy.Tpo" "$(DEPDIR)/cudachill-loop_datacopy.Po"; else rm -f "$(DEPDIR)/cudachill-loop_datacopy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_datacopy.cc' object='cudachill-loop_datacopy.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_datacopy.o -MD -MP -MF $(DEPDIR)/cudachill-loop_datacopy.Tpo -c -o cudachill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_datacopy.Tpo $(DEPDIR)/cudachill-loop_datacopy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_datacopy.cc' object='cudachill-loop_datacopy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_datacopy.o `test -f 'loop_datacopy.cc' || echo '$(srcdir)/'`loop_datacopy.cc cudachill-loop_datacopy.obj: loop_datacopy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_datacopy.obj -MD -MP -MF "$(DEPDIR)/cudachill-loop_datacopy.Tpo" -c -o cudachill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_datacopy.Tpo" "$(DEPDIR)/cudachill-loop_datacopy.Po"; else rm -f "$(DEPDIR)/cudachill-loop_datacopy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_datacopy.cc' object='cudachill-loop_datacopy.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_datacopy.obj -MD -MP -MF $(DEPDIR)/cudachill-loop_datacopy.Tpo -c -o cudachill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_datacopy.Tpo $(DEPDIR)/cudachill-loop_datacopy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_datacopy.cc' object='cudachill-loop_datacopy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_datacopy.obj `if test -f 'loop_datacopy.cc'; then $(CYGPATH_W) 'loop_datacopy.cc'; else $(CYGPATH_W) '$(srcdir)/loop_datacopy.cc'; fi` cudachill-loop_extra.o: loop_extra.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_extra.o -MD -MP -MF "$(DEPDIR)/cudachill-loop_extra.Tpo" -c -o cudachill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_extra.Tpo" "$(DEPDIR)/cudachill-loop_extra.Po"; else rm -f "$(DEPDIR)/cudachill-loop_extra.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_extra.cc' object='cudachill-loop_extra.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_extra.o -MD -MP -MF $(DEPDIR)/cudachill-loop_extra.Tpo -c -o cudachill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_extra.Tpo $(DEPDIR)/cudachill-loop_extra.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_extra.cc' object='cudachill-loop_extra.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_extra.o `test -f 'loop_extra.cc' || echo '$(srcdir)/'`loop_extra.cc cudachill-loop_extra.obj: loop_extra.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_extra.obj -MD -MP -MF "$(DEPDIR)/cudachill-loop_extra.Tpo" -c -o cudachill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_extra.Tpo" "$(DEPDIR)/cudachill-loop_extra.Po"; else rm -f "$(DEPDIR)/cudachill-loop_extra.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_extra.cc' object='cudachill-loop_extra.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_extra.obj -MD -MP -MF $(DEPDIR)/cudachill-loop_extra.Tpo -c -o cudachill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_extra.Tpo $(DEPDIR)/cudachill-loop_extra.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_extra.cc' object='cudachill-loop_extra.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_extra.obj `if test -f 'loop_extra.cc'; then $(CYGPATH_W) 'loop_extra.cc'; else $(CYGPATH_W) '$(srcdir)/loop_extra.cc'; fi` cudachill-loop_tile.o: loop_tile.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_tile.o -MD -MP -MF "$(DEPDIR)/cudachill-loop_tile.Tpo" -c -o cudachill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_tile.Tpo" "$(DEPDIR)/cudachill-loop_tile.Po"; else rm -f "$(DEPDIR)/cudachill-loop_tile.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_tile.cc' object='cudachill-loop_tile.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_tile.o -MD -MP -MF $(DEPDIR)/cudachill-loop_tile.Tpo -c -o cudachill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_tile.Tpo $(DEPDIR)/cudachill-loop_tile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_tile.cc' object='cudachill-loop_tile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_tile.o `test -f 'loop_tile.cc' || echo '$(srcdir)/'`loop_tile.cc cudachill-loop_tile.obj: loop_tile.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_tile.obj -MD -MP -MF "$(DEPDIR)/cudachill-loop_tile.Tpo" -c -o cudachill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_tile.Tpo" "$(DEPDIR)/cudachill-loop_tile.Po"; else rm -f "$(DEPDIR)/cudachill-loop_tile.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_tile.cc' object='cudachill-loop_tile.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_tile.obj -MD -MP -MF $(DEPDIR)/cudachill-loop_tile.Tpo -c -o cudachill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_tile.Tpo $(DEPDIR)/cudachill-loop_tile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_tile.cc' object='cudachill-loop_tile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_tile.obj `if test -f 'loop_tile.cc'; then $(CYGPATH_W) 'loop_tile.cc'; else $(CYGPATH_W) '$(srcdir)/loop_tile.cc'; fi` cudachill-loop_unroll.o: loop_unroll.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_unroll.o -MD -MP -MF "$(DEPDIR)/cudachill-loop_unroll.Tpo" -c -o cudachill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_unroll.Tpo" "$(DEPDIR)/cudachill-loop_unroll.Po"; else rm -f "$(DEPDIR)/cudachill-loop_unroll.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_unroll.cc' object='cudachill-loop_unroll.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_unroll.o -MD -MP -MF $(DEPDIR)/cudachill-loop_unroll.Tpo -c -o cudachill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_unroll.Tpo $(DEPDIR)/cudachill-loop_unroll.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_unroll.cc' object='cudachill-loop_unroll.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_unroll.o `test -f 'loop_unroll.cc' || echo '$(srcdir)/'`loop_unroll.cc cudachill-loop_unroll.obj: loop_unroll.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_unroll.obj -MD -MP -MF "$(DEPDIR)/cudachill-loop_unroll.Tpo" -c -o cudachill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_unroll.Tpo" "$(DEPDIR)/cudachill-loop_unroll.Po"; else rm -f "$(DEPDIR)/cudachill-loop_unroll.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_unroll.cc' object='cudachill-loop_unroll.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_unroll.obj -MD -MP -MF $(DEPDIR)/cudachill-loop_unroll.Tpo -c -o cudachill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_unroll.Tpo $(DEPDIR)/cudachill-loop_unroll.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_unroll.cc' object='cudachill-loop_unroll.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_unroll.obj `if test -f 'loop_unroll.cc'; then $(CYGPATH_W) 'loop_unroll.cc'; else $(CYGPATH_W) '$(srcdir)/loop_unroll.cc'; fi` cudachill-omegatools.o: omegatools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-omegatools.o -MD -MP -MF "$(DEPDIR)/cudachill-omegatools.Tpo" -c -o cudachill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-omegatools.Tpo" "$(DEPDIR)/cudachill-omegatools.Po"; else rm -f "$(DEPDIR)/cudachill-omegatools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='omegatools.cc' object='cudachill-omegatools.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-omegatools.o -MD -MP -MF $(DEPDIR)/cudachill-omegatools.Tpo -c -o cudachill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-omegatools.Tpo $(DEPDIR)/cudachill-omegatools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='omegatools.cc' object='cudachill-omegatools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-omegatools.o `test -f 'omegatools.cc' || echo '$(srcdir)/'`omegatools.cc cudachill-omegatools.obj: omegatools.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-omegatools.obj -MD -MP -MF "$(DEPDIR)/cudachill-omegatools.Tpo" -c -o cudachill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-omegatools.Tpo" "$(DEPDIR)/cudachill-omegatools.Po"; else rm -f "$(DEPDIR)/cudachill-omegatools.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='omegatools.cc' object='cudachill-omegatools.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-omegatools.obj -MD -MP -MF $(DEPDIR)/cudachill-omegatools.Tpo -c -o cudachill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-omegatools.Tpo $(DEPDIR)/cudachill-omegatools.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='omegatools.cc' object='cudachill-omegatools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-omegatools.obj `if test -f 'omegatools.cc'; then $(CYGPATH_W) 'omegatools.cc'; else $(CYGPATH_W) '$(srcdir)/omegatools.cc'; fi` cudachill-chill_run.o: chill_run.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run.o -MD -MP -MF "$(DEPDIR)/cudachill-chill_run.Tpo" -c -o cudachill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chill_run.Tpo" "$(DEPDIR)/cudachill-chill_run.Po"; else rm -f "$(DEPDIR)/cudachill-chill_run.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run.cc' object='cudachill-chill_run.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run.o -MD -MP -MF $(DEPDIR)/cudachill-chill_run.Tpo -c -o cudachill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chill_run.Tpo $(DEPDIR)/cudachill-chill_run.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run.cc' object='cudachill-chill_run.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run.o `test -f 'chill_run.cc' || echo '$(srcdir)/'`chill_run.cc cudachill-chill_run.obj: chill_run.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run.obj -MD -MP -MF "$(DEPDIR)/cudachill-chill_run.Tpo" -c -o cudachill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chill_run.Tpo" "$(DEPDIR)/cudachill-chill_run.Po"; else rm -f "$(DEPDIR)/cudachill-chill_run.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run.cc' object='cudachill-chill_run.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run.obj -MD -MP -MF $(DEPDIR)/cudachill-chill_run.Tpo -c -o cudachill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chill_run.Tpo $(DEPDIR)/cudachill-chill_run.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run.cc' object='cudachill-chill_run.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run.obj `if test -f 'chill_run.cc'; then $(CYGPATH_W) 'chill_run.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run.cc'; fi` cudachill-chill_run_util.o: chill_run_util.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run_util.o -MD -MP -MF "$(DEPDIR)/cudachill-chill_run_util.Tpo" -c -o cudachill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chill_run_util.Tpo" "$(DEPDIR)/cudachill-chill_run_util.Po"; else rm -f "$(DEPDIR)/cudachill-chill_run_util.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run_util.cc' object='cudachill-chill_run_util.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run_util.o -MD -MP -MF $(DEPDIR)/cudachill-chill_run_util.Tpo -c -o cudachill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chill_run_util.Tpo $(DEPDIR)/cudachill-chill_run_util.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run_util.cc' object='cudachill-chill_run_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run_util.o `test -f 'chill_run_util.cc' || echo '$(srcdir)/'`chill_run_util.cc cudachill-chill_run_util.obj: chill_run_util.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run_util.obj -MD -MP -MF "$(DEPDIR)/cudachill-chill_run_util.Tpo" -c -o cudachill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chill_run_util.Tpo" "$(DEPDIR)/cudachill-chill_run_util.Po"; else rm -f "$(DEPDIR)/cudachill-chill_run_util.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_run_util.cc' object='cudachill-chill_run_util.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_run_util.obj -MD -MP -MF $(DEPDIR)/cudachill-chill_run_util.Tpo -c -o cudachill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chill_run_util.Tpo $(DEPDIR)/cudachill-chill_run_util.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_run_util.cc' object='cudachill-chill_run_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_run_util.obj `if test -f 'chill_run_util.cc'; then $(CYGPATH_W) 'chill_run_util.cc'; else $(CYGPATH_W) '$(srcdir)/chill_run_util.cc'; fi` cudachill-chill_env.o: chill_env.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_env.o -MD -MP -MF "$(DEPDIR)/cudachill-chill_env.Tpo" -c -o cudachill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chill_env.Tpo" "$(DEPDIR)/cudachill-chill_env.Po"; else rm -f "$(DEPDIR)/cudachill-chill_env.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_env.cc' object='cudachill-chill_env.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_env.o -MD -MP -MF $(DEPDIR)/cudachill-chill_env.Tpo -c -o cudachill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chill_env.Tpo $(DEPDIR)/cudachill-chill_env.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_env.cc' object='cudachill-chill_env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_env.o `test -f 'chill_env.cc' || echo '$(srcdir)/'`chill_env.cc cudachill-chill_env.obj: chill_env.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_env.obj -MD -MP -MF "$(DEPDIR)/cudachill-chill_env.Tpo" -c -o cudachill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chill_env.Tpo" "$(DEPDIR)/cudachill-chill_env.Po"; else rm -f "$(DEPDIR)/cudachill-chill_env.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chill_env.cc' object='cudachill-chill_env.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chill_env.obj -MD -MP -MF $(DEPDIR)/cudachill-chill_env.Tpo -c -o cudachill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chill_env.Tpo $(DEPDIR)/cudachill-chill_env.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chill_env.cc' object='cudachill-chill_env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chill_env.obj `if test -f 'chill_env.cc'; then $(CYGPATH_W) 'chill_env.cc'; else $(CYGPATH_W) '$(srcdir)/chill_env.cc'; fi` cudachill-parse_expr.yy.o: parse_expr.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.yy.o -MD -MP -MF "$(DEPDIR)/cudachill-parse_expr.yy.Tpo" -c -o cudachill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-parse_expr.yy.Tpo" "$(DEPDIR)/cudachill-parse_expr.yy.Po"; else rm -f "$(DEPDIR)/cudachill-parse_expr.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.yy.cc' object='cudachill-parse_expr.yy.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.yy.o -MD -MP -MF $(DEPDIR)/cudachill-parse_expr.yy.Tpo -c -o cudachill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-parse_expr.yy.Tpo $(DEPDIR)/cudachill-parse_expr.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.yy.cc' object='cudachill-parse_expr.yy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.yy.o `test -f 'parse_expr.yy.cc' || echo '$(srcdir)/'`parse_expr.yy.cc cudachill-parse_expr.yy.obj: parse_expr.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.yy.obj -MD -MP -MF "$(DEPDIR)/cudachill-parse_expr.yy.Tpo" -c -o cudachill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-parse_expr.yy.Tpo" "$(DEPDIR)/cudachill-parse_expr.yy.Po"; else rm -f "$(DEPDIR)/cudachill-parse_expr.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.yy.cc' object='cudachill-parse_expr.yy.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.yy.obj -MD -MP -MF $(DEPDIR)/cudachill-parse_expr.yy.Tpo -c -o cudachill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-parse_expr.yy.Tpo $(DEPDIR)/cudachill-parse_expr.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.yy.cc' object='cudachill-parse_expr.yy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.yy.obj `if test -f 'parse_expr.yy.cc'; then $(CYGPATH_W) 'parse_expr.yy.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.yy.cc'; fi` cudachill-parse_expr.tab.o: parse_expr.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.tab.o -MD -MP -MF "$(DEPDIR)/cudachill-parse_expr.tab.Tpo" -c -o cudachill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-parse_expr.tab.Tpo" "$(DEPDIR)/cudachill-parse_expr.tab.Po"; else rm -f "$(DEPDIR)/cudachill-parse_expr.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.tab.cc' object='cudachill-parse_expr.tab.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.tab.o -MD -MP -MF $(DEPDIR)/cudachill-parse_expr.tab.Tpo -c -o cudachill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-parse_expr.tab.Tpo $(DEPDIR)/cudachill-parse_expr.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.tab.cc' object='cudachill-parse_expr.tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.tab.o `test -f 'parse_expr.tab.cc' || echo '$(srcdir)/'`parse_expr.tab.cc cudachill-parse_expr.tab.obj: parse_expr.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.tab.obj -MD -MP -MF "$(DEPDIR)/cudachill-parse_expr.tab.Tpo" -c -o cudachill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-parse_expr.tab.Tpo" "$(DEPDIR)/cudachill-parse_expr.tab.Po"; else rm -f "$(DEPDIR)/cudachill-parse_expr.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parse_expr.tab.cc' object='cudachill-parse_expr.tab.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-parse_expr.tab.obj -MD -MP -MF $(DEPDIR)/cudachill-parse_expr.tab.Tpo -c -o cudachill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-parse_expr.tab.Tpo $(DEPDIR)/cudachill-parse_expr.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parse_expr.tab.cc' object='cudachill-parse_expr.tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-parse_expr.tab.obj `if test -f 'parse_expr.tab.cc'; then $(CYGPATH_W) 'parse_expr.tab.cc'; else $(CYGPATH_W) '$(srcdir)/parse_expr.tab.cc'; fi` cudachill-chillmodule.o: chillmodule.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chillmodule.o -MD -MP -MF "$(DEPDIR)/cudachill-chillmodule.Tpo" -c -o cudachill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chillmodule.Tpo" "$(DEPDIR)/cudachill-chillmodule.Po"; else rm -f "$(DEPDIR)/cudachill-chillmodule.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chillmodule.cc' object='cudachill-chillmodule.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chillmodule.o -MD -MP -MF $(DEPDIR)/cudachill-chillmodule.Tpo -c -o cudachill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chillmodule.Tpo $(DEPDIR)/cudachill-chillmodule.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chillmodule.cc' object='cudachill-chillmodule.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chillmodule.o `test -f 'chillmodule.cc' || echo '$(srcdir)/'`chillmodule.cc cudachill-chillmodule.obj: chillmodule.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chillmodule.obj -MD -MP -MF "$(DEPDIR)/cudachill-chillmodule.Tpo" -c -o cudachill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-chillmodule.Tpo" "$(DEPDIR)/cudachill-chillmodule.Po"; else rm -f "$(DEPDIR)/cudachill-chillmodule.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chillmodule.cc' object='cudachill-chillmodule.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-chillmodule.obj -MD -MP -MF $(DEPDIR)/cudachill-chillmodule.Tpo -c -o cudachill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-chillmodule.Tpo $(DEPDIR)/cudachill-chillmodule.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='chillmodule.cc' object='cudachill-chillmodule.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-chillmodule.obj `if test -f 'chillmodule.cc'; then $(CYGPATH_W) 'chillmodule.cc'; else $(CYGPATH_W) '$(srcdir)/chillmodule.cc'; fi` cudachill-mem_mapping_utils.o: mem_mapping_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-mem_mapping_utils.o -MD -MP -MF "$(DEPDIR)/cudachill-mem_mapping_utils.Tpo" -c -o cudachill-mem_mapping_utils.o `test -f 'mem_mapping_utils.cc' || echo '$(srcdir)/'`mem_mapping_utils.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-mem_mapping_utils.Tpo" "$(DEPDIR)/cudachill-mem_mapping_utils.Po"; else rm -f "$(DEPDIR)/cudachill-mem_mapping_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mem_mapping_utils.cc' object='cudachill-mem_mapping_utils.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-mem_mapping_utils.o -MD -MP -MF $(DEPDIR)/cudachill-mem_mapping_utils.Tpo -c -o cudachill-mem_mapping_utils.o `test -f 'mem_mapping_utils.cc' || echo '$(srcdir)/'`mem_mapping_utils.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-mem_mapping_utils.Tpo $(DEPDIR)/cudachill-mem_mapping_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mem_mapping_utils.cc' object='cudachill-mem_mapping_utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-mem_mapping_utils.o `test -f 'mem_mapping_utils.cc' || echo '$(srcdir)/'`mem_mapping_utils.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-mem_mapping_utils.o `test -f 'mem_mapping_utils.cc' || echo '$(srcdir)/'`mem_mapping_utils.cc cudachill-mem_mapping_utils.obj: mem_mapping_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-mem_mapping_utils.obj -MD -MP -MF "$(DEPDIR)/cudachill-mem_mapping_utils.Tpo" -c -o cudachill-mem_mapping_utils.obj `if test -f 'mem_mapping_utils.cc'; then $(CYGPATH_W) 'mem_mapping_utils.cc'; else $(CYGPATH_W) '$(srcdir)/mem_mapping_utils.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-mem_mapping_utils.Tpo" "$(DEPDIR)/cudachill-mem_mapping_utils.Po"; else rm -f "$(DEPDIR)/cudachill-mem_mapping_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mem_mapping_utils.cc' object='cudachill-mem_mapping_utils.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-mem_mapping_utils.obj -MD -MP -MF $(DEPDIR)/cudachill-mem_mapping_utils.Tpo -c -o cudachill-mem_mapping_utils.obj `if test -f 'mem_mapping_utils.cc'; then $(CYGPATH_W) 'mem_mapping_utils.cc'; else $(CYGPATH_W) '$(srcdir)/mem_mapping_utils.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-mem_mapping_utils.Tpo $(DEPDIR)/cudachill-mem_mapping_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mem_mapping_utils.cc' object='cudachill-mem_mapping_utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-mem_mapping_utils.obj `if test -f 'mem_mapping_utils.cc'; then $(CYGPATH_W) 'mem_mapping_utils.cc'; else $(CYGPATH_W) '$(srcdir)/mem_mapping_utils.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-mem_mapping_utils.obj `if test -f 'mem_mapping_utils.cc'; then $(CYGPATH_W) 'mem_mapping_utils.cc'; else $(CYGPATH_W) '$(srcdir)/mem_mapping_utils.cc'; fi` cudachill-loop_cuda_rose.o: loop_cuda_rose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_cuda_rose.o -MD -MP -MF "$(DEPDIR)/cudachill-loop_cuda_rose.Tpo" -c -o cudachill-loop_cuda_rose.o `test -f 'loop_cuda_rose.cc' || echo '$(srcdir)/'`loop_cuda_rose.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_cuda_rose.Tpo" "$(DEPDIR)/cudachill-loop_cuda_rose.Po"; else rm -f "$(DEPDIR)/cudachill-loop_cuda_rose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_cuda_rose.cc' object='cudachill-loop_cuda_rose.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_cuda_rose.o -MD -MP -MF $(DEPDIR)/cudachill-loop_cuda_rose.Tpo -c -o cudachill-loop_cuda_rose.o `test -f 'loop_cuda_rose.cc' || echo '$(srcdir)/'`loop_cuda_rose.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_cuda_rose.Tpo $(DEPDIR)/cudachill-loop_cuda_rose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_cuda_rose.cc' object='cudachill-loop_cuda_rose.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_cuda_rose.o `test -f 'loop_cuda_rose.cc' || echo '$(srcdir)/'`loop_cuda_rose.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_cuda_rose.o `test -f 'loop_cuda_rose.cc' || echo '$(srcdir)/'`loop_cuda_rose.cc cudachill-loop_cuda_rose.obj: loop_cuda_rose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_cuda_rose.obj -MD -MP -MF "$(DEPDIR)/cudachill-loop_cuda_rose.Tpo" -c -o cudachill-loop_cuda_rose.obj `if test -f 'loop_cuda_rose.cc'; then $(CYGPATH_W) 'loop_cuda_rose.cc'; else $(CYGPATH_W) '$(srcdir)/loop_cuda_rose.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-loop_cuda_rose.Tpo" "$(DEPDIR)/cudachill-loop_cuda_rose.Po"; else rm -f "$(DEPDIR)/cudachill-loop_cuda_rose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loop_cuda_rose.cc' object='cudachill-loop_cuda_rose.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-loop_cuda_rose.obj -MD -MP -MF $(DEPDIR)/cudachill-loop_cuda_rose.Tpo -c -o cudachill-loop_cuda_rose.obj `if test -f 'loop_cuda_rose.cc'; then $(CYGPATH_W) 'loop_cuda_rose.cc'; else $(CYGPATH_W) '$(srcdir)/loop_cuda_rose.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-loop_cuda_rose.Tpo $(DEPDIR)/cudachill-loop_cuda_rose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='loop_cuda_rose.cc' object='cudachill-loop_cuda_rose.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_cuda_rose.obj `if test -f 'loop_cuda_rose.cc'; then $(CYGPATH_W) 'loop_cuda_rose.cc'; else $(CYGPATH_W) '$(srcdir)/loop_cuda_rose.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-loop_cuda_rose.obj `if test -f 'loop_cuda_rose.cc'; then $(CYGPATH_W) 'loop_cuda_rose.cc'; else $(CYGPATH_W) '$(srcdir)/loop_cuda_rose.cc'; fi` cudachill-ir_rose.o: ir_rose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose.o -MD -MP -MF "$(DEPDIR)/cudachill-ir_rose.Tpo" -c -o cudachill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_rose.Tpo" "$(DEPDIR)/cudachill-ir_rose.Po"; else rm -f "$(DEPDIR)/cudachill-ir_rose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose.cc' object='cudachill-ir_rose.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose.o -MD -MP -MF $(DEPDIR)/cudachill-ir_rose.Tpo -c -o cudachill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_rose.Tpo $(DEPDIR)/cudachill-ir_rose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose.cc' object='cudachill-ir_rose.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose.o `test -f 'ir_rose.cc' || echo '$(srcdir)/'`ir_rose.cc cudachill-ir_rose.obj: ir_rose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose.obj -MD -MP -MF "$(DEPDIR)/cudachill-ir_rose.Tpo" -c -o cudachill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_rose.Tpo" "$(DEPDIR)/cudachill-ir_rose.Po"; else rm -f "$(DEPDIR)/cudachill-ir_rose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose.cc' object='cudachill-ir_rose.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose.obj -MD -MP -MF $(DEPDIR)/cudachill-ir_rose.Tpo -c -o cudachill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_rose.Tpo $(DEPDIR)/cudachill-ir_rose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose.cc' object='cudachill-ir_rose.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose.obj `if test -f 'ir_rose.cc'; then $(CYGPATH_W) 'ir_rose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose.cc'; fi` cudachill-ir_rose_utils.o: ir_rose_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose_utils.o -MD -MP -MF "$(DEPDIR)/cudachill-ir_rose_utils.Tpo" -c -o cudachill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_rose_utils.Tpo" "$(DEPDIR)/cudachill-ir_rose_utils.Po"; else rm -f "$(DEPDIR)/cudachill-ir_rose_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose_utils.cc' object='cudachill-ir_rose_utils.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose_utils.o -MD -MP -MF $(DEPDIR)/cudachill-ir_rose_utils.Tpo -c -o cudachill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_rose_utils.Tpo $(DEPDIR)/cudachill-ir_rose_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose_utils.cc' object='cudachill-ir_rose_utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose_utils.o `test -f 'ir_rose_utils.cc' || echo '$(srcdir)/'`ir_rose_utils.cc cudachill-ir_rose_utils.obj: ir_rose_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose_utils.obj -MD -MP -MF "$(DEPDIR)/cudachill-ir_rose_utils.Tpo" -c -o cudachill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_rose_utils.Tpo" "$(DEPDIR)/cudachill-ir_rose_utils.Po"; else rm -f "$(DEPDIR)/cudachill-ir_rose_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_rose_utils.cc' object='cudachill-ir_rose_utils.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_rose_utils.obj -MD -MP -MF $(DEPDIR)/cudachill-ir_rose_utils.Tpo -c -o cudachill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_rose_utils.Tpo $(DEPDIR)/cudachill-ir_rose_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_rose_utils.cc' object='cudachill-ir_rose_utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_rose_utils.obj `if test -f 'ir_rose_utils.cc'; then $(CYGPATH_W) 'ir_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_rose_utils.cc'; fi` cudachill-ir_cudarose.o: ir_cudarose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cudarose.o -MD -MP -MF "$(DEPDIR)/cudachill-ir_cudarose.Tpo" -c -o cudachill-ir_cudarose.o `test -f 'ir_cudarose.cc' || echo '$(srcdir)/'`ir_cudarose.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_cudarose.Tpo" "$(DEPDIR)/cudachill-ir_cudarose.Po"; else rm -f "$(DEPDIR)/cudachill-ir_cudarose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_cudarose.cc' object='cudachill-ir_cudarose.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cudarose.o -MD -MP -MF $(DEPDIR)/cudachill-ir_cudarose.Tpo -c -o cudachill-ir_cudarose.o `test -f 'ir_cudarose.cc' || echo '$(srcdir)/'`ir_cudarose.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_cudarose.Tpo $(DEPDIR)/cudachill-ir_cudarose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_cudarose.cc' object='cudachill-ir_cudarose.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cudarose.o `test -f 'ir_cudarose.cc' || echo '$(srcdir)/'`ir_cudarose.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cudarose.o `test -f 'ir_cudarose.cc' || echo '$(srcdir)/'`ir_cudarose.cc cudachill-ir_cudarose.obj: ir_cudarose.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cudarose.obj -MD -MP -MF "$(DEPDIR)/cudachill-ir_cudarose.Tpo" -c -o cudachill-ir_cudarose.obj `if test -f 'ir_cudarose.cc'; then $(CYGPATH_W) 'ir_cudarose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cudarose.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_cudarose.Tpo" "$(DEPDIR)/cudachill-ir_cudarose.Po"; else rm -f "$(DEPDIR)/cudachill-ir_cudarose.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_cudarose.cc' object='cudachill-ir_cudarose.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cudarose.obj -MD -MP -MF $(DEPDIR)/cudachill-ir_cudarose.Tpo -c -o cudachill-ir_cudarose.obj `if test -f 'ir_cudarose.cc'; then $(CYGPATH_W) 'ir_cudarose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cudarose.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_cudarose.Tpo $(DEPDIR)/cudachill-ir_cudarose.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_cudarose.cc' object='cudachill-ir_cudarose.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cudarose.obj `if test -f 'ir_cudarose.cc'; then $(CYGPATH_W) 'ir_cudarose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cudarose.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cudarose.obj `if test -f 'ir_cudarose.cc'; then $(CYGPATH_W) 'ir_cudarose.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cudarose.cc'; fi` cudachill-ir_cuda_rose_utils.o: ir_cuda_rose_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cuda_rose_utils.o -MD -MP -MF "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo" -c -o cudachill-ir_cuda_rose_utils.o `test -f 'ir_cuda_rose_utils.cc' || echo '$(srcdir)/'`ir_cuda_rose_utils.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo" "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Po"; else rm -f "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_cuda_rose_utils.cc' object='cudachill-ir_cuda_rose_utils.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cuda_rose_utils.o -MD -MP -MF $(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo -c -o cudachill-ir_cuda_rose_utils.o `test -f 'ir_cuda_rose_utils.cc' || echo '$(srcdir)/'`ir_cuda_rose_utils.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo $(DEPDIR)/cudachill-ir_cuda_rose_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_cuda_rose_utils.cc' object='cudachill-ir_cuda_rose_utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cuda_rose_utils.o `test -f 'ir_cuda_rose_utils.cc' || echo '$(srcdir)/'`ir_cuda_rose_utils.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cuda_rose_utils.o `test -f 'ir_cuda_rose_utils.cc' || echo '$(srcdir)/'`ir_cuda_rose_utils.cc cudachill-ir_cuda_rose_utils.obj: ir_cuda_rose_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cuda_rose_utils.obj -MD -MP -MF "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo" -c -o cudachill-ir_cuda_rose_utils.obj `if test -f 'ir_cuda_rose_utils.cc'; then $(CYGPATH_W) 'ir_cuda_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cuda_rose_utils.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo" "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Po"; else rm -f "$(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ir_cuda_rose_utils.cc' object='cudachill-ir_cuda_rose_utils.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cudachill-ir_cuda_rose_utils.obj -MD -MP -MF $(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo -c -o cudachill-ir_cuda_rose_utils.obj `if test -f 'ir_cuda_rose_utils.cc'; then $(CYGPATH_W) 'ir_cuda_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cuda_rose_utils.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cudachill-ir_cuda_rose_utils.Tpo $(DEPDIR)/cudachill-ir_cuda_rose_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ir_cuda_rose_utils.cc' object='cudachill-ir_cuda_rose_utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cuda_rose_utils.obj `if test -f 'ir_cuda_rose_utils.cc'; then $(CYGPATH_W) 'ir_cuda_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cuda_rose_utils.cc'; fi` -uninstall-info-am: +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cudachill_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cudachill-ir_cuda_rose_utils.obj `if test -f 'ir_cuda_rose_utils.cc'; then $(CYGPATH_W) 'ir_cuda_rose_utils.cc'; else $(CYGPATH_W) '$(srcdir)/ir_cuda_rose_utils.cc'; fi` # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1071,66 +1230,20 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -1142,118 +1255,162 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/include - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find "$(distdir)" -type d ! -perm -755 \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -1261,25 +1418,33 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -1299,14 +1464,24 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1329,7 +1504,7 @@ all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive @@ -1342,16 +1517,22 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1374,18 +1555,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: install-binPROGRAMS +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -1407,25 +1608,28 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS -uninstall-info: uninstall-info-recursive +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-binPROGRAMS clean-generic clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-binPROGRAMS \ + clean-cscope clean-generic cscope cscopelist-am ctags ctags-am \ + dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ - distclean-recursive distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS # rules @@ -1440,6 +1644,7 @@ parse_expr.yy.cc: parse_expr.tab.cc parse_expr.ll parse_expr.tab.cc: parse_expr.yy bison -t -d parse_expr.yy + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: @@ -1,42 +1 @@ -CHiLL 0.2 open source release -See LICENSE file for copyright information. - -CHiLL is a composable high-level loop transformation framework. It -supports a wide variety of loop transformations on a whole loop nest -or individual sub loop nests inside. Different transformations can be -applied in sequence. A scripting interface is also provided and -optimizing parameters used by the script can be modified on the fly. - - -What is new? -============ - -version 0.2: - * More robust transformation composition. - -version 0.1: - * Initial release. - - -DIRECTORIES -=========== - -chill/ source files - examples/ examples for using CHiLL scripts - dep_test/ more examples for calculating data dependence - bin/ links to executables: chill - lib/ links to libraries: libchill_xform.a - include/ links to header files - - -DOCUMENTATION AND QUESTIONS -=========================== - -Currently the best overview can be found here (not up-to-date): - "CHiLL: A Framework for Composing High-Level Loop Transformations", - by Chun Chen, Jacqueline Chame and Mary Hall, - USC CS TR 08-897 - -Software website: - -For questions, bug reports or suggestions, please contact: +Please see user manual CHiLL.pdf for installation instructions. diff --git a/ROSE_INSTALL.txt b/ROSE_INSTALL.txt deleted file mode 100644 index 79e0c43..0000000 --- a/ROSE_INSTALL.txt +++ /dev/null @@ -1,77 +0,0 @@ -INSTALLATION STEPS: - -1) Please install Boost library version <= 1.45.0 using these instruccions - -1. Download BOOST. -Download BOOST at www.boost.org/users/download. - -2. Untar BOOST. -Type tar -zxf BOOST-[VersionNumber].tar.gz to untar the BOOST distribution. - -3. Create a separate install tree. -Type mkdir installTree to create a location for the install. - -4. Run the bootstrap.sh script. -Type ./bootstrap.sh --prefix=[installTree] - -5. Run bjam. -Type ./bjam install --prefix=[installTree] - - -6) set your BOOSTHOME environment variable to where you've installed BOOST. - -7) Download the latest version of rose from the website. - https://outreach.scidac.gov/frs/?group_id=24 - -8) set the JAVA_HOME environment variable in your ${HOME}/.bashrc - eg. export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk - -9) add this to the LD_LIBRARY_PATH environment variable - - LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386/server:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${BOOSTHOME}/lib - -10) make a new empty directory separate from the downloaded source directory($ROSE_SRC) for rose. - eg. mkdir ${HOME}/compileTree - -11) set your ROSEHOME environment variable in ${HOME}/.bashrc to ${HOME}/compileTree - -12) run the following command from this ${ROSEHOME} - ${ROSE_SRC}/configure --prefix=${ROSEHOME} --with-boost=${BOOSTHOME} --with-boost-libdir=${BOOSTHOME}/lib -with-haskell=no - -13) run the following command to compile: - make install-core - - -14) Install lua version <= 5.1 (usually not necessary to set the LUAHOME environment variable unless - you installed it in a local directory, in which case set LUAHOME to that directory). Lua is only required for - cuda-chill and not plain chill. - -15) If you are installing for CUDA-CHILL set the CUDACHILL environment variable to true - else false - - -16) Install omega by doing the following commands - i) make clean - ii) make veryclean - iii)make depend - iv) make - -17) Set your OMEGAHOME environment variable to the appropriate directory in ${HOME}/.bashrc - -18) Install cuda-chill by doing the following commands - i) make clean - ii) make veryclean - iii)make depend-cuda-chill - iv) make cuda-chill - - else if you are installing just plain chill - export CUDACHILL=false; (remember to rebuild plain omega as well) - i) make clean - ii) make veryclean - iii)make depend - iv) make - -19) Go to examples/cuda-chill and run ../../cuda-chill mm.lua - -20) If running plain Chill go to examples/chill and run ../../chill gemm.script @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,7 +11,16 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,26 +30,43 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.14' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.14.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -59,7 +85,7 @@ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -85,24 +111,24 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -116,17 +142,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -136,7 +159,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -149,11 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -161,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -180,6 +206,16 @@ AC_CACHE_CHECK([dependency style of $depcc], if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -191,34 +227,49 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -251,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -261,69 +312,85 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -332,7 +399,7 @@ done # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -342,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -366,16 +436,20 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -391,48 +465,122 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi ]) +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -443,18 +591,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -465,17 +614,22 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -489,21 +643,18 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1998-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], -[AC_PREREQ(2.50)dnl +[AC_PREREQ([2.50])dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then @@ -512,14 +663,12 @@ fi]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -527,7 +676,7 @@ AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -537,24 +686,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -564,15 +713,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -580,112 +726,54 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -693,13 +781,60 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To @@ -724,13 +859,13 @@ AC_DEFUN([_AM_IF_OPTION], # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ - dnl Find a Python interpreter. Python versions prior to 1.5 are not - dnl supported because the default installation locations changed from - dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages - dnl in 1.5. + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], - [python python2 python2.5 python2.4 python2.3 python2.2 dnl -python2.1 python2.0 python1.6 python1.5]) +[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) m4_if([$1],[],[ dnl No version check is needed. @@ -743,10 +878,11 @@ python2.1 python2.0 python1.6 python1.5]) dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - AC_MSG_CHECKING([whether $PYTHON version >= $1]) + AC_MSG_CHECKING([whether $PYTHON version is >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], - [AC_MSG_RESULT(yes)], - [AC_MSG_ERROR(too old)]) + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Python interpreter is too old])]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies @@ -777,7 +913,7 @@ python2.1 python2.0 python1.6 python1.5]) dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], - [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding @@ -792,9 +928,28 @@ python2.1 python2.0 python1.6 python1.5]) dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], - [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# <https://github.com/pypa/virtualenv/issues/118> +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" dnl Set up 4 directories: @@ -802,9 +957,7 @@ python2.1 python2.0 python1.6 python1.5]) dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. - dnl Query distutils for this directory. distutils does not exist in - dnl Python 1.5, so we fall back to the hardcoded directory if it - dnl doesn't work. + dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE @@ -813,13 +966,27 @@ python2.1 python2.0 python1.6 python1.5]) else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || - echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) @@ -832,9 +999,7 @@ python2.1 python2.0 python1.6 python1.5]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) - dnl Query distutils for this directory. distutils does not exist in - dnl Python 1.5, so we fall back to the hardcoded directory if it - dnl doesn't work. + dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE @@ -843,13 +1008,27 @@ python2.1 python2.0 python1.6 python1.5]) else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) @@ -871,19 +1050,20 @@ python2.1 python2.0 python1.6 python1.5]) # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. -# hexversion has been introduced in Python 1.5.2; it's probably not -# worth to support older versions (1.5.1 was released on October 31, 1998). +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], - [prog="import sys, string + [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. -minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 -for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -902,45 +1082,60 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -950,9 +1145,85 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -960,40 +1231,55 @@ AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1003,75 +1289,114 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + AM_RUN_LOG([cat conftest.dir/file]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/buildall b/buildall new file mode 100755 index 0000000..cb203d4 --- /dev/null +++ b/buildall @@ -0,0 +1,140 @@ +#!/bin/bash +# Set up environment to build and install CHiLL at Blue Waters + +echo "This script needs to be customized before it is executed..." +exit + +# Package directory ... +export PACKAGEDIR=/sw/sources/chill + +# Directory to build in ... +export BUILDDIR=/u/sciteam/rwheeler/scratch + +# Directory to install permanent files ... +export INSTALLDIR=/sw/xe/chill + +# Install tools in seperate directories +export AUTOCONFINSTALLDIR=$INSTALLDIR/autoconf +export GCCINSTALLDIR=$INSTALLDIR/gcc +export BOOSTINSTALLDIR=$INSTALLDIR/boost +export ROSEINSTALLDIR=$INSTALLDIR/rose + +# Packages already installed +export JAVA_HOME=/opt/java/jdk1.7.0_45 +export PYTHON_INCDIR=/usr/include/python2.6 +export PYTHON_LIBDIR=/usr/lib64 +export PYTHON_VERSION=2.6 + +# Create toplevel build and installation directories if they do not already exist... +if false; then +mkdir -p $BUILDDIR +mkdir -p $INSTALLDIR +mkdir -p $INSTALLDIR/lib +mkdir -p $INSTALLDIR/lib64 +mkdir -p $INSTALLDIR/bin +mkdir -p $AUTOCONFINSTALLDIR +mkdir -p $GCCINSTALLDIR +mkdir -p $BOOSTINSTALLDIR +mkdir -p $ROSEINSTALLDIR +fi + +export PATH=$INSTALLDIR/bin:$PATH + +# +# Unpack needed items into the build area +# +if false; then +cd $BUILDDIR +for dir in autoconf/autoconf-2.69 gcc/gcc-4.4.7 boost/boost_1_45_0 rose/edg4x-rose chill/chill-0.2.1; do + mkdir -p `dirname $dir`/build + echo checking for `basename $dir` + if [ ! -d $dir ]; then + echo unpacking tar file `basename $dir`.tar.gz + (cd `dirname $dir`; tar xzf $PACKAGEDIR/`basename $dir`.tar.gz) + fi +done +fi + +# +# Configure and build autoconf +# +if false; then +echo Building autoconf +cd $BUILDDIR/autoconf/build +../autoconf-2.69/configure --prefix=$AUTOCONFINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +export PATH=$AUTOCONFINSTALLDIR/bin:$PATH + +# +# Configure and build gcc +# +if false; then +echo Building gcc +cd $BUILDDIR/gcc/build +../gcc-4.4.7/configure --prefix=$GCCINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +export PATH=$GCCINSTALLDIR/bin:$PATH +export LD_LIBRARY_PATH=$GCCINSTALLDIR/lib64:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$GCCINSTALLDIR/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH + +# +# Configure and build boost +# +if false; then +echo Building Boost +export BOOSTLIBSNEEDED=date_time,filesystem,program_options,regex,system,thread,wave,iostreams +cd $BUILDDIR/boost/boost_1_45_0 +./bootstrap.sh --prefix=$BOOSTINSTALLDIR --with-libraries=$BOOSTLIBSNEEDED +./bjam install --prefix=$BOOSTINSTALLDIR --build-dir=../build +fi + +export LD_LIBRARY_PATH=$BOOSTINSTALLDIR/lib:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$BOOSTINSTALLDIR/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH + +# +# Configure and build rose +# +if false; then +echo Building Rose +cd $BUILDDIR/rose/build +../edg4x-rose/configure --prefix=$ROSEINSTALLDIR --with-boost=$BOOSTINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +export LD_LIBRARY_PATH=$ROSEINSTALLDIR/lib:$JAVA_HOME/jre/lib/amd64/server:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$ROSEINSTALLDIR/include:$ROSEINSTALLDIR/include/rose:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH + +# +# Configure and build chill +# +if false; then +echo Building CHiLL +cd $BUILDDIR/chill/chill-0.2.1 +./configure --with-interface=python --prefix=$INSTALLDIR --with-rose=$ROSEINSTALLDIR --with-boost=$BOOSTINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +# +# Test CHiLL +# +if false; then +echo Testing CHiLL +cd $BUILDDIR/chill/chill-0.2.1/test-chill +./runtests +fi + +echo Remember to set your paths to... +echo +echo 'export PATH=$PATH:'$INSTALLDIR/bin +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'$ROSEINSTALLDIR/lib:$BOOSTINSTALLDIR/lib:$JAVA_HOME/jre/lib/amd64/server diff --git a/chill_env.cc b/chill_env.cc deleted file mode 100644 index 991f13c..0000000 --- a/chill_env.cc +++ /dev/null @@ -1,1442 +0,0 @@ -/***************************************************************************** - Copyright (C) 2010 University of Utah. - All Rights Reserved. - - Purpose: - Register variables and functions into the global Lua addres space to - provide an environment for CHiLL scripts - - Notes: - Contains Lua wrappers for the CHiLL Loop class and methods. - - History: - 01/2010 created by Gabe Rudy - 03/2014 added support for CHiLL without Cuda (Derick Huth) -*****************************************************************************/ - -#define lua_c -#include <lua.hpp> //All lua includes wrapped in extern "C" -#include "loop.hh" -#include "chill_env.hh" - -#ifdef CUDACHILL - -#ifdef BUILD_ROSE -#include "loop_cuda_rose.hh" -#include "ir_rose.hh" -#include "ir_cudarose.hh" -#elif BUILD_SUIF -#include "loop_cuda.hh" -#include "ir_suif.hh" -#include "ir_cudasuif.hh" -#endif - -#else - -#include "chill_run_util.hh" -#include <omega.h> -#include "ir_code.hh" -#ifdef BUILD_ROSE -#include "ir_rose.hh" -#elif BUILD_SUIF -#include "ir_suif.hh" -#endif - -#endif - -using namespace omega; - -#ifdef CUDACHILL -extern LoopCuda *myloop; -#else -extern Loop *myloop; -#endif -extern IR_Code *ir_code; -extern bool is_interactive; -extern bool repl_stop; - -std::string procedure_name; -std::string source_filename; - -extern std::vector<IR_Control *> ir_controls; -extern std::vector<int> loops; - -//Macros for wrapping code to myloop-> that translates C++ exceptions to -//Lua stracktraced errors -#define REQUIRE_LOOP try{ if (myloop == NULL){ throw std::runtime_error("loop not initialized"); } -#define END_REQUIRE_LOOP }catch (const std::exception &e) { return luaL_error(L, e.what()); } - -#ifdef CUDACHILL -void register_v1(lua_State *L); -void register_v2(lua_State *L); - -#endif -//Extra param checking -static bool luaL_checkboolean(lua_State *L, int narg) { - if (!lua_isboolean(L,narg)) - luaL_typerror(L, narg, "boolean"); - return lua_toboolean(L, narg); -} - -static bool luaL_optboolean(lua_State *L, int narg, bool def) { - return luaL_opt(L, luaL_checkboolean, narg, def); -} - -static bool tointvector(lua_State *L, int narg, std::vector<int>& v) { - if (!lua_istable(L, narg)) - return false; - - //Iterate through array (table) - lua_pushnil(L); // first key - while (lua_next(L, narg) != 0) { - // uses 'key' (at index -2) and 'value' (at index -1) - v.push_back((int) luaL_checknumber(L, -1)); - //printf("added: %d", v[v.size()-1]); - // removes 'value'; keeps 'key' for next iteration - lua_pop(L, 1); - } - return true; -} - -static bool tointset(lua_State* L, int narg, std::set<int>& s) { - if(!lua_istable(L, narg)) - return false; - // iterate through array (lua table) - lua_pushnil(L); // first key - while (lua_next(L, narg) != 0) { - int val = (int)luaL_checknumber(L, -1); - //printf("added: %d\n", val); - s.insert(val); - lua_pop(L, 1); - } -} - -static bool tostringvector(lua_State *L, int narg, - std::vector<std::string>& v) { - if (!lua_istable(L, narg)) - return false; - - //Iterate through array (table) - lua_pushnil(L); // first key - while (lua_next(L, narg) != 0) { - // uses 'key' (at index -2) and 'value' (at index -1) - v.push_back(luaL_checkstring(L,-1)); - //printf("added: %d", v[v.size()-1]); - // removes 'value'; keeps 'key' for next iteration - lua_pop(L, 1); - } - return true; -} - -static bool tostringmap(lua_State *L, int narg, - std::map<std::string, std::string>& v) { - if (!lua_istable(L, narg)) - return false; - - //Iterate through array (table) - lua_pushnil(L); // first key - while (lua_next(L, narg) != 0) { - // uses 'key' (at index -2) and 'value' (at index -1) - v.insert( - std::make_pair(luaL_checkstring(L,-2), luaL_checkstring(L,-1))); - //printf("added: %d", v[v.size()-1]); - // removes 'value'; keeps 'key' for next iteration - lua_pop(L, 1); - } - return true; -} - -static bool tostringintmap(lua_State *L, int narg, - std::map<std::string, int>& v) { - if (!lua_istable(L, narg)) - return false; - - //Iterate through array (table) - lua_pushnil(L); // first key - while (lua_next(L, narg) != 0) { - // uses 'key' (at index -2) and 'value' (at index -1) - v.insert( - std::make_pair(luaL_checkstring(L,-2), - (int) luaL_checknumber(L, -1))); - //printf("added: %d", v[v.size()-1]); - // removes 'value'; keeps 'key' for next iteration - lua_pop(L, 1); - } - return true; -} - -static bool tostringintmapvector(lua_State *L, int narg, std::vector<std::map<std::string, int> >& v) { - if(!lua_istable(L, narg)) - return false; - lua_pushnil(L); - // Iterate over table - while(lua_next(L, narg) != 0) { - std::map<std::string, int> map; - // use 'value' (at index -1), discard key - // try to parse table as a 'string to int' map. - if(!tostringintmap(L, -1, map)) - return false; - v.push_back(map); - lua_pop(L, 1); - } - return true; -} - -static bool tointmatrix(lua_State *L, int narg, - std::vector<std::vector<int> >& m) { - if (!lua_istable(L, narg)) - return false; - - //Iterate through array (table) - lua_pushnil(L); // first key - while (lua_next(L, narg) != 0) { - // uses 'key' (at index -2) and 'value' (at index -1) - if (!lua_istable(L,-1)) { - lua_pop(L, 2); - return false; - } - m.push_back(std::vector<int>()); - int i = m.size() - 1; - //Now iterate over the keys of the second level table - int l2 = lua_gettop(L); //Index of second level table - lua_pushnil(L); // first key - while (lua_next(L, l2) != 0) { - int k = (int) luaL_checknumber(L, -1); - m[i].push_back(k); - //printf("m[%d][%d] = %d\n", i,m[i].size()-1,k); - lua_pop(L, 1); - } - lua_pop(L, 1); - // removes 'value'; keeps 'key' for next iteration - } - return true; -} - -static void strict_arg_num(lua_State *L, int num) { - int n = lua_gettop(L); //Number of arguments - if (n != num) - throw std::runtime_error("incorrect number of arguments"); -} - -// ------------------------------------------------------------------- -// Initialization and finalization functions -// ------------------------------------------------------------------- -#ifdef CUDACHILL -/* The function we'll call from the lua script */ -static int init(lua_State *L) { - int n = lua_gettop(L); //Number of arguments - if (n > 0) { - //Expet one of the following forms - //l1 = init("mm4.sp2",0,0) --input file, procedure 0, loop 0 - //or - //l1 = init("mm4.sp2","NameFromPragma") - - const char* source_filename = luaL_optstring(L,1,0); -#ifdef BUILD_ROSE - if(lua_isstring(L,2)) { - const char* procedure_name = luaL_optstring(L, 2, 0); -#elif BUILD_SUIF - if (lua_isnumber(L, 2)) { - int procedure_number = luaL_optint(L, 2, 0); -#endif - int loop_num = luaL_optint(L, 3, 0); - - lua_getglobal(L, "dest"); - const char* dest_lang = lua_tostring(L,-1); - lua_pop(L, 1); -#ifdef BUILD_ROSE - ir_code = new IR_cudaroseCode(source_filename, procedure_name); -#elif BUILD_SUIF - //ir_code = new IR_cudasuifCode(source_filename, procedure_number, dest_lang); - - ir_code = new IR_cudasuifCode(source_filename, procedure_number); - //myloop = new LoopCuda(ir_code->init_loop(loop_num), loop_num); //protonu--using the modified constructor - - //protonu--here goes my initializations - //A lot of this code was lifted from Chun's parser.yy - //the plan is now to create the LoopCuda object directly -#endif - IR_Block *block = ir_code->GetCode(); - ir_controls = ir_code->FindOneLevelControlStructure(block); - -#ifdef BUILD_ROSE - - int loop_count = 0; - for (int i = 0; i < ir_controls.size(); i++) { - if (ir_controls[i]->type() == IR_CONTROL_LOOP) { - loops.push_back(i); - loop_count++; - } - } - delete block; - - std::vector<IR_Control *> parm; - for(int j = 0; j < loop_count; j++) - parm.push_back(ir_controls[loops[j]]); - - block = ir_code->MergeNeighboringControlStructures(parm); -#elif BUILD_SUIF - for (int i = 0; i < ir_controls.size(); i++) - if (ir_controls[i]->type() == IR_CONTROL_LOOP) - loops.push_back(i); - delete block; - - std::vector<IR_Control *> parm; - parm.push_back(ir_controls[loop_num]); - - block = ir_code->MergeNeighboringControlStructures(parm); -#endif - myloop = new LoopCuda(block, loop_num); - delete block; - - //end-protonu - - } else { - //TODO: handle pragma lookup - } - //Also register a different set of global functions - myloop->original(); - myloop->useIdxNames = true; //Use idxName in code_gen - register_v2(L); - //TODO: return a reference to the intial array if that makes sense - //still - return 0; - } - lua_getglobal(L, "source"); - const char* source_filename = lua_tostring(L,-1); - lua_pop(L, 1); - - lua_getglobal(L, "dest"); - const char* dest_lang = lua_tostring(L,-1); - lua_pop(L, 1); - - lua_getglobal(L, "procedure"); -#ifdef BUILD_ROSE - const char* procedure_name = lua_tostring(L , -1); -#elif BUILD_SUIF - int procedure_number = lua_tointeger(L,-1); -#endif - lua_pop(L, 1); - - lua_getglobal(L, "loop"); - int loop_num = lua_tointeger(L, -1); - lua_pop(L, 1); - -//ir_code = new IR_cudasuifCode(source_filename, procedure_number, dest_lang); -#ifdef BUILD_ROSE - ir_code = new IR_cudaroseCode(source_filename, procedure_name); - -#elif BUILD_SUIF - ir_code = new IR_cudasuifCode(source_filename, procedure_number); -//myloop = new LoopCuda(ir_code->init_loop(loop_num), loop_num); //protonu--using the modified constructor -//protonu--here goes my initializations -//A lot of this code was lifted from Chun's parser.yy -//the plan is now to create the LoopCuda object directly -#endif - IR_Block *block = ir_code->GetCode(); - ir_controls = ir_code->FindOneLevelControlStructure(block); - -#ifdef BUILD_ROSE - - int loop_count = 0; - for (int i = 0; i < ir_controls.size(); i++) { - if (ir_controls[i]->type() == IR_CONTROL_LOOP) { - loops.push_back(i); - loop_count++; - } - } - delete block; - - std::vector<IR_Control *> parm; - for(int j = 0; j < loop_count; j++) - parm.push_back(ir_controls[loops[j]]); - - block = ir_code->MergeNeighboringControlStructures(parm); -#elif BUILD_SUIF - for (int i = 0; i < ir_controls.size(); i++) - if (ir_controls[i]->type() == IR_CONTROL_LOOP) - loops.push_back(i); - delete block; - - std::vector<IR_Control *> parm; - parm.push_back(ir_controls[loop_num]); - - block = ir_code->MergeNeighboringControlStructures(parm); -#endif - myloop = new LoopCuda(block, loop_num); - delete block; - -//register_v1(L); - register_v2 (L); - return 0; -} -#else -static void strict_arg_num(lua_State* L, int min, int max) { - int n = lua_gettop(L); - if(n < min || n > max) - throw std::runtime_error("incorrect number of arguments"); -} - -int get_loop_num_start(lua_State *L) { - lua_getglobal(L, "loop_start"); - int loop_num_start = lua_tointeger(L, -1); - lua_pop(L, 1); - return loop_num_start; -} -int get_loop_num_end(lua_State* L) { - lua_getglobal(L, "loop_end"); - int loop_num_end = lua_tointeger(L, -1); - lua_pop(L, 1); - return loop_num_end; -} - -static int set_loop_num_start(lua_State *L, int start_num) { - lua_pushinteger(L, start_num); - lua_setglobal(L, "loop_start"); -} -static int set_loop_num_end(lua_State *L, int end_num) { - lua_pushinteger(L, end_num); - lua_setglobal(L, "loop_end"); -} - -static int source(lua_State* L) { - if(!source_filename.empty()) { - fprintf(stderr, "only one file can be handled in a script"); - if(!is_interactive) - exit(2); - } - source_filename = luaL_checkstring(L, 1); - return 0; -} - - -static int procedure(lua_State* L) { - if(!procedure_name.empty()) { - fprintf(stderr, "only one procedure can be handled in a script"); - if(!is_interactive) - exit(2); - } - procedure_name = luaL_checkstring(L, 1); - return 0; -} - -void finalize_loop(int loop_num_start, int loop_num_end) { - if (loop_num_start == loop_num_end) { - ir_code->ReplaceCode(ir_controls[loops[loop_num_start]], myloop->getCode()); - ir_controls[loops[loop_num_start]] = NULL; - } - else { - std::vector<IR_Control *> parm; - for (int i = loops[loop_num_start]; i <= loops[loop_num_end]; i++) - parm.push_back(ir_controls[i]); - IR_Block *block = ir_code->MergeNeighboringControlStructures(parm); - ir_code->ReplaceCode(block, myloop->getCode()); - for (int i = loops[loop_num_start]; i <= loops[loop_num_end]; i++) { - delete ir_controls[i]; - ir_controls[i] = NULL; - } - } - delete myloop; -} -void finalize_loop(lua_State* L) { - int loop_num_start = get_loop_num_start(L); - int loop_num_end = get_loop_num_end(L); - finalize_loop(loop_num_start, loop_num_end); -} -static void init_loop(lua_State* L, int loop_num_start, int loop_num_end) { - if (source_filename.empty()) { - fprintf(stderr, "source file not set when initializing the loop"); - if (!is_interactive) - exit(2); - } - else { - if (ir_code == NULL) { - #ifdef BUILD_ROSE - if (procedure_name.empty()) - procedure_name = "main"; - #elif BUILD_SUIF - if (procedure_number == -1) - procedure_number = 0; - #endif - - #ifdef BUILD_ROSE - ir_code = new IR_roseCode(source_filename.c_str(), procedure_name.c_str()); - #elif BUILD_SUIF - ir_code = new IR_suifCode(source_filename.c_str(), procedure_name.c_str()); - #endif - - IR_Block *block = ir_code->GetCode(); - ir_controls = ir_code->FindOneLevelControlStructure(block); - for (int i = 0; i < ir_controls.size(); i++) { - if (ir_controls[i]->type() == IR_CONTROL_LOOP) - loops.push_back(i); - } - delete block; - } - if (myloop != NULL && myloop->isInitialized()) { - finalize_loop(L); - } - } - set_loop_num_start(L, loop_num_start); - set_loop_num_end(L, loop_num_end); - if (loop_num_end < loop_num_start) { - fprintf(stderr, "the last loop must be after the start loop"); - if (!is_interactive) - exit(2); - } - if (loop_num_end >= loops.size()) { - fprintf(stderr, "loop %d does not exist", loop_num_end); - if (!is_interactive) - exit(2); - } - std::vector<IR_Control *> parm; - for (int i = loops[loop_num_start]; i <= loops[loop_num_end]; i++) { - if (ir_controls[i] == NULL) { - fprintf(stderr, "loop has already been processed"); - if (!is_interactive) - exit(2); - } - parm.push_back(ir_controls[i]); - } - IR_Block *block = ir_code->MergeNeighboringControlStructures(parm); - myloop = new Loop(block); - delete block; - //if (is_interactive) printf("%s ", PROMPT_STRING); -} - -static int loop(lua_State* L) { - // loop (n) - // loop (n:m) - int nargs = lua_gettop(L); - int start_num; - int end_num; - if(nargs == 1) { - start_num = luaL_optint(L, 1, 0); - end_num = start_num; - } - else if(nargs == 2) { - start_num = luaL_optint(L, 1, 0); - end_num = luaL_optint(L, 2, 0); - } - else { - fprintf(stderr, "loop takes one or two arguments"); - if(!is_interactive) - exit(2); - } - init_loop(L, start_num, end_num); - return 0; -} -#endif - -#ifdef CUDACHILL - - static int exit(lua_State *L) { - strict_arg_num(L, 0); - repl_stop = true; - return 0; - } - - static int print_code(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - myloop->printCode(); - printf("\n"); - END_REQUIRE_LOOP; - return 0; - } - - static int print_ri(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - myloop->printRuntimeInfo(); - printf("\n"); - END_REQUIRE_LOOP; - return 0; - } - - static int print_idx(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - myloop->printIndexes(); - printf("\n"); - END_REQUIRE_LOOP; - return 0; - } - - static int print_dep(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - std::cout << myloop->dep; - END_REQUIRE_LOOP; - return 0; - } - - static int print_space(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - for (int i = 0; i < myloop->stmt.size(); i++) { - printf("s%d: ", i + 1); - Relation r; - if (!myloop->stmt[i].xform.is_null()) - r = Composition(copy(myloop->stmt[i].xform), copy(myloop->stmt[i].IS)); - else - r = copy(myloop->stmt[i].IS); - r.simplify(2, 4); - r.print(); - }END_REQUIRE_LOOP; - return 0; - } - - static int num_statement(lua_State *L) { - REQUIRE_LOOP; - lua_pushinteger(L, myloop->stmt.size()); - END_REQUIRE_LOOP; - return 1; - } - - static int does_var_exists(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 1); - std::string symName = luaL_optstring(L,1,""); - lua_pushboolean(L, myloop->symbolExists(symName)); - END_REQUIRE_LOOP; - return 1; - } - - static int add_sync(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 2); - int stmt = luaL_optint(L,1,0); - std::string idxName = luaL_optstring(L,2,""); - myloop->addSync(stmt, idxName); - END_REQUIRE_LOOP; - return 0; - } - - static int rename_index(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - int stmt = luaL_optint(L,1,0); - std::string idxName = luaL_optstring(L,2,""); - std::string newName = luaL_optstring(L,3,""); - myloop->renameIndex(stmt, idxName, newName); - END_REQUIRE_LOOP; - return 0; - } - -//basic on index names - static int permute_v2(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 2); - int stmt = luaL_optint(L,1,0); - std::vector<std::string> order; - if (!tostringvector(L, 2, order)) { - throw std::runtime_error("second arg must be a string vector"); - } - myloop->permute_cuda(stmt, order); - END_REQUIRE_LOOP; - return 0; - } - - static int tile_v2(lua_State *L) { - REQUIRE_LOOP; - int n = lua_gettop(L); //Number of arguments - if (n != 3 && n != 7) - throw std::runtime_error("incorrect number of arguments"); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - if (n == 3) { - int outer_level = luaL_optint(L, 3, 1); - myloop->tile_cuda(stmt_num, level, outer_level); - } else { - int tile_size = luaL_optint(L, 3, 0); - int outer_level = luaL_optint(L, 4, 1); - std::string idxName = luaL_optstring(L,5,""); - std::string ctrlName = luaL_optstring(L,6,""); - TilingMethodType method = StridedTile; - if (n > 6) { - int imethod = luaL_optint(L, 7, 2); - if (imethod == 0) - method = StridedTile; - else if (imethod == 1) - method = CountedTile; - else { - throw std::runtime_error( - "7th argument must be either strided or counted"); - } - } - myloop->tile_cuda(stmt_num, level, tile_size, outer_level, idxName, - ctrlName, method); - }END_REQUIRE_LOOP; - return 0; - } - - static int cur_indices(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 1); - int stmt_num = luaL_optint(L, 1, 0); -//TODO: needs to be per stmt - lua_createtable(L, myloop->idxNames[stmt_num].size(), 0); - for (int i = 0; i < myloop->idxNames[stmt_num].size(); i++) { - lua_pushinteger(L, i + 1); - lua_pushstring(L, myloop->idxNames[stmt_num][i].c_str()); - lua_settable(L, -3); - }END_REQUIRE_LOOP; - return 1; - } - - static int block_indices(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - lua_newtable(L); - if (myloop->cu_bx > 1) { - lua_pushinteger(L, 1); - lua_pushstring(L, "bx"); - lua_settable(L, -3); - } - if (myloop->cu_by > 1) { - lua_pushinteger(L, 2); - lua_pushstring(L, "by"); - lua_settable(L, -3); - }END_REQUIRE_LOOP; - return 1; - } - - static int thread_indices(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - lua_newtable(L); - if (myloop->cu_tx > 1) { - lua_pushinteger(L, 1); - lua_pushstring(L, "tx"); - lua_settable(L, -3); - } - if (myloop->cu_ty > 1) { - lua_pushinteger(L, 2); - lua_pushstring(L, "ty"); - lua_settable(L, -3); - } - if (myloop->cu_tz > 1) { - lua_pushinteger(L, 3); - lua_pushstring(L, "tz"); - lua_settable(L, -3); - }END_REQUIRE_LOOP; - return 1; - } - - static int block_dims(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - lua_pushinteger(L, myloop->cu_bx); - lua_pushinteger(L, myloop->cu_by); - END_REQUIRE_LOOP; - return 2; - } - - static int thread_dims(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - lua_pushinteger(L, myloop->cu_tx); - lua_pushinteger(L, myloop->cu_ty); - lua_pushinteger(L, myloop->cu_tz); - END_REQUIRE_LOOP; - return 3; - } - - static int hard_loop_bounds(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 2); - int stmt = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - int upper, lower; - myloop->extractCudaUB(stmt, level, upper, lower); - lua_pushinteger(L, lower); - lua_pushinteger(L, upper); - END_REQUIRE_LOOP; - return 2; - } - - static int datacopy_v2(lua_State *L) { - REQUIRE_LOOP; - int n = lua_gettop(L); //Number of arguments - -//overload 1 -//examples: -// datacopy(0,4,a,false,0,1,-16) -// datacopy(0,3,2,1) - if (n < 4 || n > 9) - throw std::runtime_error("incorrect number of arguments"); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - const char* array_name = luaL_optstring(L, 3, 0); - std::vector<std::string> new_idxs; - if (!tostringvector(L, 4, new_idxs)) - throw std::runtime_error("fourth argument must be an array of strings"); - bool allow_extra_read = luaL_optboolean(L, 5, false); - int fastest_changing_dimension = luaL_optint(L, 6, -1); - int padding_stride = luaL_optint(L, 7, 1); - int padding_alignment = luaL_optint(L, 8, 1); - bool cuda_shared = luaL_optboolean(L, 9, false); - myloop->datacopy_cuda(stmt_num, level, array_name, new_idxs, allow_extra_read, - fastest_changing_dimension, padding_stride, padding_alignment, - cuda_shared); - END_REQUIRE_LOOP; - return 0; - } - - static int datacopy_privatized_v2(lua_State *L) { - REQUIRE_LOOP; - int n = lua_gettop(L); //Number of arguments - -//example: -//datacopy_privatized(0,3,"a",{4,5},false,-1,1,1) - if (n < 4 || n > 9) - throw std::runtime_error("incorrect number of arguments"); - int stmt_num = luaL_optint(L, 1, 0); - std::string level_idx = luaL_optstring(L,2,""); - int level = myloop->findCurLevel(stmt_num, level_idx); - const char* array_name = luaL_optstring(L, 3, 0); - - std::vector<std::string> privatized_idxs; - if (!tostringvector(L, 4, privatized_idxs)) - throw std::runtime_error("4th argument must be an array of index strings"); - std::vector<int> privatized_levels(privatized_idxs.size()); - for (int i = 0; i < privatized_idxs.size(); i++) - privatized_levels[i] = myloop->findCurLevel(stmt_num, privatized_idxs[i]); - - bool allow_extra_read = luaL_optboolean(L, 5, false); - int fastest_changing_dimension = luaL_optint(L, 6, -1); - int padding_stride = luaL_optint(L, 7, 1); - int padding_alignment = luaL_optint(L, 8, 1); - bool cuda_shared = luaL_optboolean(L, 9, false); - myloop->datacopy_privatized_cuda(stmt_num, level, array_name, privatized_levels, - allow_extra_read, fastest_changing_dimension, padding_stride, - padding_alignment, cuda_shared); - END_REQUIRE_LOOP; - return 0; - } - - static int unroll_v2(lua_State *L) { - REQUIRE_LOOP; -//int n = lua_gettop(L); //Number of arguments - strict_arg_num(L, 3); - int stmt_num = luaL_optint(L, 1, 0); - int level; - if (lua_isnumber(L, 2)) { - level = luaL_optint(L, 2, 0); - } else { - std::string level_idx = luaL_optstring(L,2,""); - level = myloop->findCurLevel(stmt_num, level_idx); - } - int unroll_amount = luaL_optint(L, 3, 0); - bool does_expand = myloop->unroll_cuda(stmt_num, level, unroll_amount); - lua_pushboolean(L, does_expand); - END_REQUIRE_LOOP; - return 1; - } - - static int cudaize_v2(lua_State *L) { - REQUIRE_LOOP; - //int n = lua_gettop(L); //Number of arguments - strict_arg_num(L, 3); - - std::string kernel_name = luaL_optstring(L, 1, 0); - - std::vector<std::string> blockIdxs; - std::vector<std::string> threadIdxs; - std::map<std::string, int> array_sizes; - if (!tostringintmap(L, 2, array_sizes)) - throw std::runtime_error("second argument must be a map[string->int]"); - - if (lua_istable(L, 3)) { - //Iterate through array (table) - lua_pushnil(L); // first key - while (lua_next(L, 3) != 0) { - // uses 'key' (at index -2) and 'value' (at index -1) - if (strcmp(luaL_checkstring(L,-2), "block") == 0) { - if (!tostringvector(L, lua_gettop(L), blockIdxs)) - throw std::runtime_error( - "third argument must have a string list for its 'block' key"); - } else if (strcmp(luaL_checkstring(L,-2), "thread") == 0) { - if (!tostringvector(L, lua_gettop(L), threadIdxs)) - throw std::runtime_error( - "third argument must have a string list for its 'thread' key"); - } else { - goto v2NotTable; - } - lua_pop(L, 1); - } - } else { - v2NotTable: throw std::runtime_error( - "third argument must be a table with 'block' and 'thread' as potential keys and list of indexes as values"); - } - myloop->cudaize_v2(kernel_name, array_sizes, blockIdxs, threadIdxs); - END_REQUIRE_LOOP; - return 0; - } - - int get_loop_num(lua_State *L) { - lua_getglobal(L, "loop"); - int loop_num = lua_tointeger(L, -1); - lua_pop(L, 1); - return loop_num; - } - - - static int copy_to_texture(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 1); - std::string array_name = luaL_optstring(L,1,0); - myloop->copy_to_texture(array_name.c_str()); - END_REQUIRE_LOOP; - return 0; - } - - /*static int copy_to_texture_2d(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - std::string array_name = luaL_optstring(L, 1, 0); - int width = luaL_optint(L, 2, 0); - int height = luaL_optint(L, 3, 0); - myloop->copy_to_texture_2d(array_name.c_str(), width, height); - END_REQUIRE_LOOP; - return 0; - }*/ - -//protonu-constant memory--place holder for now - static int copy_to_constant(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 1); - std::string array_name = luaL_optstring(L,1,0); -//call to loop->copy_to_texture goes here - myloop->copy_to_constant(array_name.c_str()); - END_REQUIRE_LOOP; - return 0; - - } -#else - - static int print_code(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - myloop->printCode(); - printf("\n"); - END_REQUIRE_LOOP; - return 0; - } - - static int print_dep(lua_State* L) { - REQUIRE_LOOP; - myloop->printDependenceGraph(); - END_REQUIRE_LOOP; - return 0; - } - - static int print_space(lua_State* L) { - REQUIRE_LOOP; - myloop->printIterationSpace(); - END_REQUIRE_LOOP; - return 0; - } - - static int exit(lua_State *L) { - strict_arg_num(L, 0); - repl_stop = true; - return 0; - } - -static int known(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 1); - int num_dim = myloop->known.n_set(); - - // parse expression from string - std::vector<std::map<std::string, int> >* cond; - std::string cond_expr = luaL_optstring(L,1,0); - cond = parse_relation_vector(cond_expr.c_str()); - - Relation rel(num_dim); - F_And *f_root = rel.add_and(); - for (int j = 0; j < cond->size(); j++) { - GEQ_Handle h = f_root->add_GEQ(); - for (std::map<std::string, int>::iterator it = (*cond)[j].begin(); it != (*cond)[j].end(); it++) { - try { - int dim = from_string<int>(it->first); - if (dim == 0) - h.update_const(it->second); - else - throw std::invalid_argument("only symbolic variables are allowed in known condition"); - } - catch (std::ios::failure e) { - Free_Var_Decl *g = NULL; - for (unsigned i = 0; i < myloop->freevar.size(); i++) { - std::string name = myloop->freevar[i]->base_name(); - if (name == it->first) { - g = myloop->freevar[i]; - break; - } - } - if (g == NULL) - throw std::invalid_argument("symbolic variable " + it->first + " not found"); - else - h.update_coef(rel.get_local(g), it->second); - } - } - } - myloop->addKnown(rel); - END_REQUIRE_LOOP; - return 0; -} - - static int remove_dep(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - int from = luaL_optint(L, 1, 0); - int to = luaL_optint(L, 2, 0); - myloop->removeDependence(from, to); - END_REQUIRE_LOOP; - return 0; - } - - static int original(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 0); - myloop->original(); - END_REQUIRE_LOOP; - return 0; - } - - static int permute(lua_State *L) { - REQUIRE_LOOP; - int nargs = lua_gettop(L); - if((nargs < 1) || (nargs > 3)) - throw std::runtime_error("incorrect number of arguments in permute"); - if(nargs == 1) { - // premute ( vector ) - std::vector<int> pi; - if(!tointvector(L, 1, pi)) - throw std::runtime_error("first arg in permute(pi) must be an int vector"); - myloop->permute(pi); - } - else if (nargs == 2) { - // permute ( set, vector ) - std::set<int> active; - std::vector<int> pi; - if(!tointset(L, 1, active)) - throw std::runtime_error("the first argument in permute(active, pi) must be an int set"); - if(!tointvector(L, 2, pi)) - throw std::runtime_error("the second argument in permute(active, pi) must be an int vector"); - myloop->permute(active, pi); - } - else if (nargs == 3) { - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - std::vector<int> pi; - if(!tointvector(L, 3, pi)) - throw std::runtime_error("the third argument in permute(stmt_num, level, pi) must be an int vector"); - myloop->permute(stmt_num, level, pi); - } - END_REQUIRE_LOOP; - return 0; - } - - static int pragma(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - std::string pragmaText = luaL_optstring(L, 3, ""); - myloop->pragma(stmt_num, level, pragmaText); - END_REQUIRE_LOOP; - return 0; - } - - static int prefetch(lua_State *L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - std::string prefetchText = luaL_optstring(L, 3, ""); - int hint = luaL_optint(L, 4, 0); - myloop->prefetch(stmt_num, level, prefetchText, hint); - END_REQUIRE_LOOP; - return 0; - } - - static int tile(lua_State* L) { - REQUIRE_LOOP; - int nargs = lua_gettop(L); - if((nargs < 3) || (nargs > 7)) - throw std::runtime_error("incorrect number of arguments for tile"); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - int tile_size = luaL_optint(L, 3, 0); - if(nargs == 3) { - myloop->tile(stmt_num, level, tile_size); - } - else if(nargs >= 4) { - int outer_level = luaL_optint(L, 4, 0); - if(nargs >= 5) { - TilingMethodType method = StridedTile; - int imethod = luaL_optint(L, 5, 2); - // check method input against expected values - if (imethod == 0) - method = StridedTile; - else if (imethod == 1) - method = CountedTile; - else - throw std::runtime_error("5th argument must be either strided or counted"); - if(nargs >= 6) { - int alignment_offset = luaL_optint(L, 6, 0); - if(nargs == 7) { - int alignment_multiple = luaL_optint(L, 7, 1); - myloop->tile(stmt_num, level, tile_size, outer_level, method, alignment_offset, alignment_multiple); - } - if(nargs == 6) - myloop->tile(stmt_num, level, tile_size, outer_level, method, alignment_offset); - } - if(nargs == 5) - myloop->tile(stmt_num, level, tile_size, outer_level, method); - } - if(nargs == 4) - myloop->tile(stmt_num, level, tile_size, outer_level); - } - END_REQUIRE_LOOP; - return 0; - } - - static int datacopy(lua_State* L) { - REQUIRE_LOOP; - int nargs = lua_gettop(L); - if((nargs < 3) || (nargs > 7)) - throw std::runtime_error("incorrect number of arguments for datacopy"); - // Overload 1: bool datacopy(const std::vector<std::pair<int, std::vector<int> > > &array_ref_nums, int level, bool allow_extra_read = false, int fastest_changing_dimension = -1, int padding_stride = 1, int padding_alignment = 4, int memory_type = 0); - // Overload 2: bool datacopy(int stmt_num, int level, const std::string &array_name, bool allow_extra_read = false, int fastest_changing_dimension = -1, int padding_stride = 1, int padding_alignment = 4, int memory_type = 0); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - std::string array_name = std::string(luaL_optstring(L,3,0)); - bool allow_extra_read = luaL_optboolean(L, 4, false); - int fastest_changing_dimension = luaL_optint(L, 5, -1); - int padding_stride = luaL_optint(L, 6, 1); - int padding_alignment = luaL_optint(L, 7, 4); - int memory_type = luaL_optint(L, 8, 0); - myloop->datacopy(stmt_num, level, array_name, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, memory_type); - END_REQUIRE_LOOP; - return 0; - } - - static int datacopy_privatized(lua_State* L) { - // bool datacopy_privatized(int stmt_num, int level, const std::string &array_name, const std::vector<int> &privatized_levels, bool allow_extra_read = false, int fastest_changing_dimension = -1, int padding_stride = 1, int padding_alignment = 1, int memory_type = 0); - REQUIRE_LOOP; - int nargs = lua_gettop(L); - if((nargs < 4) || (nargs > 9)) - throw std::runtime_error("incorrect number of arguments for datacopy_privatized"); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - std::string array_name = std::string(luaL_optstring(L, 3, 0)); - std::vector<int> privatized_levels; - tointvector(L, 4, privatized_levels); - bool allow_extra_read = luaL_optboolean(L, 5, false); - int fastest_changing_dimension = luaL_optint(L, 6, -1); - int padding_stride = luaL_optint(L, 7, 1); - int padding_alignment = luaL_optint(L, 8, 1); - int memory_type = luaL_optint(L, 9, 0); - myloop->datacopy_privatized(stmt_num, level, array_name, privatized_levels, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, memory_type); - END_REQUIRE_LOOP; - return 0; - } - - static int unroll(lua_State* L) { - REQUIRE_LOOP; - int nargs = lua_gettop(L); - if((nargs < 3) || (nargs > 4)) - throw std::runtime_error("incorrect number of arguments for unroll"); - //std::set<int> unroll(int stmt_num, int level, int unroll_amount, std::vector< std::vector<std::string> >idxNames= std::vector< std::vector<std::string> >(), int cleanup_split_level = 0); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - int unroll_amount = luaL_optint(L, 3, 0); - std::vector< std::vector<std::string> > idxNames = std::vector< std::vector<std::string> >(); - int cleanup_split_level = luaL_optint(L, 4, 0); - myloop->unroll(stmt_num, level, unroll_amount, idxNames, cleanup_split_level); - END_REQUIRE_LOOP; - return 0; - } - - static int unroll_extra(lua_State* L) { - REQUIRE_LOOP; - int nargs = lua_gettop(L); - if((nargs < 3) || (nargs < 4)) - throw std::runtime_error("incorrect number of arguments for unroll_extra"); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - int unroll_amount = luaL_optint(L, 3, 0); - int cleanup_split_level = luaL_optint(L, 4, 0); - myloop->unroll_extra(stmt_num, level, unroll_amount, cleanup_split_level); - END_REQUIRE_LOOP; - return 0; - } - - static int split(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - int num_dim = myloop->stmt[stmt_num].xform.n_out(); - - // parse expression from string - std::vector<std::map<std::string, int> >* cond; - std::string cond_expr = luaL_optstring(L,3,0); - cond = parse_relation_vector(cond_expr.c_str()); - - Relation rel((num_dim-1)/2); - F_And *f_root = rel.add_and(); - for (int j = 0; j < cond->size(); j++) { - GEQ_Handle h = f_root->add_GEQ(); - for (std::map<std::string, int>::iterator it = (*cond)[j].begin(); it != (*cond)[j].end(); it++) { - try { - int dim = from_string<int>(it->first); - if (dim == 0) - h.update_const(it->second); - else { - if (dim > (num_dim-1)/2) - throw std::invalid_argument("invalid loop level " + to_string(dim) + " in split condition"); - h.update_coef(rel.set_var(dim), it->second); - } - } - catch (std::ios::failure e) { - Free_Var_Decl *g = NULL; - for (unsigned i = 0; i < myloop->freevar.size(); i++) { - std::string name = myloop->freevar[i]->base_name(); - if (name == it->first) { - g = myloop->freevar[i]; - break; - } - } - if (g == NULL) - throw std::invalid_argument("unrecognized variable " + to_string(it->first.c_str())); - h.update_coef(rel.get_local(g), it->second); - } - } - } - myloop->split(stmt_num,level,rel); - END_REQUIRE_LOOP; - return 0; - } - -static int nonsingular(lua_State* L) { - REQUIRE_LOOP; - std::vector< std::vector<int> > mat; - tointmatrix(L, 1, mat); - myloop->nonsingular(mat); - END_REQUIRE_LOOP; - return 0; -} - -static int skew(lua_State* L) { - REQUIRE_LOOP; - std::set<int> stmt_nums; - std::vector<int> skew_amounts; - int level = luaL_optint(L, 2, 0); - tointset(L, 1, stmt_nums); - tointvector(L, 3, skew_amounts); - myloop->skew(stmt_nums, level, skew_amounts); - END_REQUIRE_LOOP; - return 0; -} - -static int scale(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - std::set<int> stmt_nums; - int level = luaL_optint(L, 2, 0); - int scale_amount = luaL_optint(L, 3, 0); - tointset(L, 1, stmt_nums); - myloop->scale(stmt_nums, level, scale_amount); - END_REQUIRE_LOOP; - return 0; -} - -static int reverse(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 2); - std::set<int> stmt_nums; - int level = luaL_optint(L, 2, 0); - tointset(L, 1, stmt_nums); - myloop->reverse(stmt_nums, level); - END_REQUIRE_LOOP; - return 0; -} - -static int shift(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - std::set<int> stmt_nums; - int level = luaL_optint(L, 2, 0); - int shift_amount = luaL_optint(L, 3, 0); - tointset(L, 1, stmt_nums); - myloop->shift(stmt_nums, level, shift_amount); - END_REQUIRE_LOOP; - return 0; -} - -static int shift_to(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 3); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - int absolute_pos = luaL_optint(L, 3, 0); - myloop->shift_to(stmt_num, level, absolute_pos); - END_REQUIRE_LOOP; - return 0; -} - -static int peel(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 2, 3); - int stmt_num = luaL_optint(L, 1, 0); - int level = luaL_optint(L, 2, 0); - int amount = luaL_optint(L, 3, 1); - myloop->peel(stmt_num, level, amount); - END_REQUIRE_LOOP; - return 0; -} - -static int fuse(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 2); - std::set<int> stmt_nums; - int level = luaL_optint(L, 2, 0); - tointset(L, 1, stmt_nums); - myloop->fuse(stmt_nums, level); - END_REQUIRE_LOOP; - return 0; -} - -static int distribute(lua_State* L) { - REQUIRE_LOOP; - strict_arg_num(L, 2); - std::set<int> stmts; - int level = luaL_optint(L, 1, 0); - tointset(L, 2, stmts); - myloop->distribute(stmts, level); - END_REQUIRE_LOOP; - return 0; -} - -static int num_statements(lua_State *L) { - REQUIRE_LOOP; - lua_pushinteger(L, myloop->stmt.size()); - END_REQUIRE_LOOP; - return 1; -} -#endif - -/** - * Register global methods available to chill scripts - */ - void register_globals(lua_State *L) { -//--- -//Preset globals -//--- - lua_pushstring(L, CHILL_BUILD_VERSION); - lua_setglobal(L, "VERSION"); - - lua_pushstring(L, "C"); - lua_setglobal(L, "dest"); - lua_pushstring(L, "C"); - lua_setglobal(L, "C"); - -//--- -//Enums for functions -//--- - -//TileMethod - lua_pushinteger(L, 0); - lua_setglobal(L, "strided"); - lua_pushinteger(L, 1); - lua_setglobal(L, "counted"); - -//MemoryMode - lua_pushinteger(L, 0); - lua_setglobal(L, "global"); - lua_pushinteger(L, 1); - lua_setglobal(L, "shared"); - lua_pushinteger(L, 2); - lua_setglobal(L, "texture"); - -//Bool flags - lua_pushboolean(L, 1); - lua_setglobal(L, "sync"); -//... - } - -#ifdef CUDACHILL - void register_functions(lua_State *L) { - lua_register(L, "init", init); - lua_register(L, "exit", exit); - lua_register(L, "print_code", print_code); - lua_register(L, "print_ri", print_ri); - lua_register(L, "print_idx", print_idx); - lua_register(L, "print_dep", print_dep); - lua_register(L, "print_space", print_space); - lua_register(L, "num_statement", num_statement); - } - - void register_v2(lua_State *L) { - lua_register(L, "cudaize", cudaize_v2); - lua_register(L, "tile", tile_v2); - lua_register(L, "permute", permute_v2); - lua_register(L, "datacopy_privatized", datacopy_privatized_v2); - lua_register(L, "datacopy", datacopy_v2); - lua_register(L, "unroll", unroll_v2); - - lua_register(L, "cur_indices", cur_indices); - lua_register(L, "block_indices", block_indices); - lua_register(L, "thread_indices", thread_indices); - lua_register(L, "block_dims", block_dims); - - lua_register(L, "thread_dims", thread_dims); - lua_register(L, "hard_loop_bounds", hard_loop_bounds); - lua_register(L, "num_statements", num_statement); - - lua_register(L, "does_exists", does_var_exists); - lua_register(L, "add_sync", add_sync); - lua_register(L, "rename_index", rename_index); - - lua_register(L, "copy_to_texture", copy_to_texture); - lua_register(L, "copy_to_constant", copy_to_constant); - } - -#else // CHiLL - void register_functions(lua_State* L) { - lua_register(L, "source", source); - lua_register(L, "procedure", procedure); - lua_register(L, "loop", loop); - lua_register(L, "print_code", print_code); - lua_register(L, "print_dep", print_dep); - lua_register(L, "print_space", print_space); - lua_register(L, "exit", exit); - lua_register(L, "known", known); - lua_register(L, "remove_dep", remove_dep); - lua_register(L, "original", original); - lua_register(L, "permute", permute); - lua_register(L, "pragma", pragma); - lua_register(L, "prefetch", prefetch); - lua_register(L, "tile", tile); - lua_register(L, "datacopy", datacopy); - lua_register(L, "datacopy_privatised", datacopy_privatized); - lua_register(L, "unroll", unroll); - lua_register(L, "unroll_extra", unroll_extra); - lua_register(L, "split", split); - lua_register(L, "nonsingular", nonsingular); - lua_register(L, "skew", skew); - lua_register(L, "scale", scale); - lua_register(L, "reverse", reverse); - lua_register(L, "shift", shift); - lua_register(L, "shift_to", shift_to); - lua_register(L, "peel", peel); - lua_register(L, "fuse", fuse); - lua_register(L, "distribute", distribute); - lua_register(L, "num_statements", num_statements); - } -#endif diff --git a/chill_env.hh b/chill_env.hh deleted file mode 100644 index 28e8fcf..0000000 --- a/chill_env.hh +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef CHILL_ENV_H -#define CHILL_ENV_H - -typedef struct lua_State lua_State; - -void register_globals(lua_State *L); -void register_functions(lua_State *L); -#ifdef CUDACHILL -int get_loop_num(lua_State *L); -#else -void finalize_loop(int loop_num_start, int loop_num_end); -int get_loop_num_start(lua_State *L); -int get_loop_num_end(lua_State *L); -#endif -#endif diff --git a/chill_run.cc b/chill_run.cc index a3c9180..d33819b 100644 --- a/chill_run.cc +++ b/chill_run.cc @@ -281,14 +281,14 @@ int main( int argc, char* argv[] ) //--- // Run a CHiLL interpreter //--- - printf("CUDA-CHiLL v0.2.0 (built on %s)\n", CHILL_BUILD_DATE); + printf("CHiLL v0.2.1 (built on %s)\n", CHILL_BUILD_DATE); printf("Copyright (C) 2008 University of Southern California\n"); printf("Copyright (C) 2009-2012 University of Utah\n"); //is_interactive = true; // let the lua interpreter know. fflush(stdout); // TODO: read lines of python code. //Not sure if we should set fail from interactive mode - printf("CUDA-CHiLL ending...\n"); + printf("CHiLL ending...\n"); fflush(stdout); } @@ -336,7 +336,7 @@ int main( int argc, char* argv[] ) //--- // Run a CHiLL interpreter //--- - printf("CUDA-CHiLL v0.2.0 (built on %s)\n", CHILL_BUILD_DATE); + printf("CUDA-CHiLL v0.2.1 (built on %s)\n", CHILL_BUILD_DATE); printf("Copyright (C) 2008 University of Southern California\n"); printf("Copyright (C) 2009-2012 University of Utah\n"); is_interactive = true; // let the lua interpreter know. @@ -359,7 +359,6 @@ int main( int argc, char* argv[] ) #endif #ifdef BUILD_ROSE ((IR_cudaroseCode *)(ir_code))->commit_loop(myloop, lnum); - ((IR_roseCode*)(ir_code))->finalizeRose(); #elif BUILD_SUIF ((IR_cudasuifCode *)(ir_code))->commit_loop(myloop, lnum); #endif @@ -375,16 +374,14 @@ int main( int argc, char* argv[] ) lnum_end = get_loop_num_end(L); DEBUG_PRINT("calling ROSE code gen? loop num %d - %d\n", lnum_start, lnum_end); #endif - +#endif #ifdef BUILD_ROSE finalize_loop(lnum_start, lnum_end); //((IR_roseCode*)(ir_cide))->commit_loop(myloop, lnum); ((IR_roseCode*)(ir_code))->finalizeRose(); - #elif BUILD_SUIF - ((IR_suifCode*)(ir_code))->commit_loop(myloop, lnum); + //#elif BUILD_SUIF + //((IR_suifCode*)(ir_code))->commit_loop(myloop, lnum); #endif - -#endif delete ir_code; } #ifdef PYTHON diff --git a/chillmodule.cc b/chillmodule.cc index fa55199..fbeb477 100644 --- a/chillmodule.cc +++ b/chillmodule.cc @@ -1431,7 +1431,7 @@ static PyObject* chill_permute(PyObject* self, PyObject* args) { int stmt_num = intArg(args, 1); int level = intArg(args, 2); std::vector<int> pi; - if(!tointvector(args, 2, pi)) + if(!tointvector(args, 3, pi)) throw std::runtime_error("the third argument in permute(stmt_num, level, pi) must be an int vector"); myloop->permute(stmt_num, level, pi); } @@ -1750,7 +1750,7 @@ static PyMethodDef ChillMethods[] = { {"print_space", chill_print_space, METH_VARARGS, "print something or other "}, {"add_sync", chill_add_sync, METH_VARARGS, "add sync, whatever that is"}, {"rename_index", chill_rename_index, METH_VARARGS, "rename a loop index"}, - {"permute", chill_permute_v2, METH_VARARGS, "change the order of loops?"}, + {"permute", chill_permute, METH_VARARGS, "change the order of loops?"}, {"tile3", chill_tile_v2_3arg, METH_VARARGS, "something to do with tile"}, {"tile7", chill_tile_v2_7arg, METH_VARARGS, "something to do with tile"}, {"thread_dims", thread_dims, METH_VARARGS, "tx, ty, tz "}, @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for chill 0.2.1. +# Generated by GNU Autoconf 2.69 for chill 0.2.1. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,21 +235,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -327,6 +355,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -448,6 +484,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -482,16 +522,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -503,28 +543,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -562,7 +582,9 @@ PACKAGE_BUGREPORT='' PACKAGE_URL='' enable_option_checking=no -ac_subst_vars='LTLIBOBJS +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS subdirs LUA_OPT_FALSE @@ -605,6 +627,7 @@ LEXLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -622,6 +645,10 @@ LEX_OUTPUT_ROOT LEX CHILL_BUILD_VERSION CCLD +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -629,6 +656,7 @@ am__leading_dot SET_MAKE AWK mkdir_p +MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh @@ -640,6 +668,7 @@ ACLOCAL VERSION PACKAGE CYGPATH_W +am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -684,6 +713,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_dependency_tracking enable_cuda enable_coverage @@ -705,7 +735,8 @@ CXX CXXFLAGS CCC YACC -YFLAGS' +YFLAGS +PYTHON' ac_subdirs_all='omega' # Initialize some variables set by options. @@ -1161,8 +1192,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1322,8 +1351,12 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-cuda builds cudachill @@ -1364,6 +1397,7 @@ Some influential environment variables: YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. + PYTHON the Python interpreter Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1432,9 +1466,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF chill configure 0.2.1 -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1510,7 +1544,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1571,7 +1605,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by chill $as_me 0.2.1, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1947,7 +1981,8 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version="1.9" +am__api_version='1.14' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1985,7 +2020,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2043,32 +2078,50 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2080,6 +2133,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2093,48 +2156,173 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else - mkdir_p='$(install_sh) -d' + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP fi +else + STRIP="$ac_cv_prog_STRIP" +fi + fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do @@ -2154,7 +2342,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2218,10 +2406,53 @@ else fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi fi # test whether we have cygpath @@ -2264,119 +2495,70 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +mkdir_p='$(MKDIR_P)' -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. -AMTAR=${AMTAR-"${am_missing_run}tar"} -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi #AC_SUBST([prefix],["$(pwd)/bin"]) @@ -2387,6 +2569,7 @@ CCLD="$""(CXX)" CHILL_BUILD_VERSION="\\\"0.2.1\\\"" +AM_PROG_AC DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -2395,7 +2578,7 @@ ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -2406,24 +2589,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi @@ -2439,10 +2622,9 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -2451,7 +2633,6 @@ else fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2474,7 +2655,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2514,7 +2695,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2567,7 +2748,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2608,7 +2789,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2666,7 +2847,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2710,7 +2891,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3156,8 +3337,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3242,6 +3422,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -3253,8 +3492,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3272,6 +3512,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3283,34 +3528,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3338,9 +3598,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3370,7 +3628,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3402,7 +3660,8 @@ a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } -e { yyless (input () != 0); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% @@ -3535,7 +3794,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3575,7 +3834,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3628,7 +3887,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3669,7 +3928,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3727,7 +3986,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3771,7 +4030,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3967,8 +4226,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4053,6 +4311,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4064,8 +4381,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4083,6 +4401,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4094,34 +4417,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4149,9 +4487,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -4190,7 +4526,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4234,7 +4570,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4430,8 +4766,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4449,6 +4786,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4460,34 +4802,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4515,9 +4872,7 @@ fi $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= @@ -4545,7 +4900,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4585,7 +4940,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4638,7 +4993,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4668,16 +5023,20 @@ test -n "$YACC" || YACC="yacc" + + if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.7" >&5 -$as_echo_n "checking whether $PYTHON version >= 2.7... " >&6; } - prog="import sys, string + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.7" >&5 +$as_echo_n "checking whether $PYTHON version is >= 2.7... " >&6; } + prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. -minver = map(int, string.split('2.7', '.')) + [0, 0, 0] +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] minverhex = 0 -for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 @@ -4687,7 +5046,9 @@ sys.exit(sys.hexversion < minverhex)" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - as_fn_error $? "too old" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else @@ -4699,14 +5060,16 @@ if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break - prog="import sys, string + prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. -minver = map(int, string.split('2.7', '.')) + [0, 0, 0] +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] minverhex = 0 -for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 @@ -4741,7 +5104,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4780,7 +5143,7 @@ $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else - am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } @@ -4799,16 +5162,35 @@ $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else - am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# <https://github.com/pypa/virtualenv/issues/118> +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 @@ -4819,13 +5201,27 @@ else else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || - echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac fi @@ -4838,7 +5234,7 @@ $as_echo "$am_cv_python_pythondir" >&6; } pkgpythondir=\${pythondir}/$PACKAGE - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 @@ -4849,13 +5245,27 @@ else else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac fi @@ -4896,9 +5306,7 @@ fi fi - - -if test "x$enable_cuda" == xyes; then + if test "x$enable_cuda" == xyes; then CUDACHILL_OPT_TRUE= CUDACHILL_OPT_FALSE='#' else @@ -5009,14 +5417,14 @@ if test "x$interface_lang" == xdefault; then : if test "x$enable_cuda" == xyes; then : - use_python=no + use_python=yes - use_lua=yes + use_lua=no else - use_python=no + use_python=yes use_lua=no @@ -5025,6 +5433,8 @@ fi if test "x$interface_lang" == xlua; then : + use_python=no + use_lua=yes fi @@ -5032,11 +5442,11 @@ if test "x$interface_lang" == xpython; then : use_python=yes -fi - + use_lua=no +fi -if test "x$use_python" == xyes; then + if test "x$use_python" == xyes; then PYTHON_OPT_TRUE= PYTHON_OPT_FALSE='#' else @@ -5044,9 +5454,7 @@ else PYTHON_OPT_FALSE= fi - - -if test "x$use_lua" == xyes; then + if test "x$use_lua" == xyes; then LUA_OPT_TRUE= LUA_OPT_FALSE='#' else @@ -5172,6 +5580,22 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -5498,16 +5922,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -5567,28 +5991,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5610,7 +6022,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by chill $as_me 0.2.1, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5676,16 +6088,17 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ chill config.status 0.2.1 -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -5769,7 +6182,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -6254,6 +6667,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -6308,6 +6726,7 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ @@ -6353,21 +6772,22 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - "$ac_file" | "$ac_file":* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6394,17 +6814,28 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ @@ -6427,28 +6858,26 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ @@ -6471,11 +6900,12 @@ $as_echo X"$file" | q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ;; esac diff --git a/configure.ac b/configure.ac index 6174151..c8296b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_INIT([chill],[0.2.1]) AC_CONFIG_AUX_DIR([.]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) #AC_SUBST([prefix],["$(pwd)/bin"]) @@ -8,6 +8,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_SUBST([CCLD],["$""(CXX)"]) AC_SUBST([CHILL_BUILD_VERSION],["\\\"0.2.1\\\""]) +AM_PROG_AC AM_PROG_LEX AC_PROG_CC AC_PROG_CXX @@ -87,16 +88,18 @@ AC_ARG_WITH([lua],[ AS_IF([test "x$interface_lang" == xdefault],[ AS_IF([test "x$enable_cuda" == xyes],[ - AC_SUBST([use_python],[no]) - AC_SUBST([use_lua],[yes]) + AC_SUBST([use_python],[yes]) + AC_SUBST([use_lua],[no]) ],[ - AC_SUBST([use_python],[no]) + AC_SUBST([use_python],[yes]) AC_SUBST([use_lua],[no])])],[]) AS_IF([test "x$interface_lang" == xlua],[ + AC_SUBST([use_python],[no]) AC_SUBST([use_lua],[yes])],[]) AS_IF([test "x$interface_lang" == xpython],[ - AC_SUBST([use_python],[yes])],[]) + AC_SUBST([use_python],[yes]) + AC_SUBST([use_lua],[no])],[]) AM_CONDITIONAL([PYTHON_OPT],[test "x$use_python" == xyes]) AM_CONDITIONAL([LUA_OPT],[test "x$use_lua" == xyes]) @@ -37,7 +37,7 @@ std::ostream& operator<<(std::ostream &os, const DependenceVector &d) { switch (d.type) { case DEP_W2R: - os << "flow"; + os << "true"; if (d.is_reduction) os << "_reduction"; break; diff --git a/examples/chill/gemm.c b/examples/chill/gemm.c deleted file mode 100644 index a565511..0000000 --- a/examples/chill/gemm.c +++ /dev/null @@ -1,18 +0,0 @@ - -#define N 512 - -int main() { - - float a[N][N], b[N][N], c[N][N]; - - int i, j, k; - - for (j = 0; j < N; j++) - for (k = 0; k < N; k++) - for (i = 0; i < N; i++) { - c[i][j] = c[i][j] + a[i][k] * b[k][j]; - } - - return 0; -} - diff --git a/examples/chill/gemm.script b/examples/chill/gemm.script deleted file mode 100644 index ed91567..0000000 --- a/examples/chill/gemm.script +++ /dev/null @@ -1,31 +0,0 @@ -#matrix multiply large array size for intel machine -source: gemm.c -procedure: main -format: rose -loop: 0 - -TI = 128 -TJ = 8 -TK = 512 -UI = 2 -UJ = 2 - -permute([3,1,2]) -tile(0,2,TJ) -#print space -tile(0,2,TI) -#print space -tile(0,5,TK) -#print space - -datacopy(0,3,a,false,1) -#print space - -datacopy(0,4,b) -print -unroll(0,4,UI)#print space -print -unroll(0,5,UJ) -#print space -print - diff --git a/examples/chill/gemv.c b/examples/chill/gemv.c deleted file mode 100644 index 610d4cb..0000000 --- a/examples/chill/gemv.c +++ /dev/null @@ -1,15 +0,0 @@ -#define N 10 - -int main() { - // int n; - float a[N]; - float b[N]; - float c[N][N]; - - int i, j; - - for (i = 1; i < N; i++) - for (j = 1; j < N; j++) - a[i] = a[i] + c[i][j] * b[j]; - -} diff --git a/examples/chill/gemv.script b/examples/chill/gemv.script deleted file mode 100644 index f1d5f89..0000000 --- a/examples/chill/gemv.script +++ /dev/null @@ -1,9 +0,0 @@ -source: gemv.c # matrix-vector multiply -procedure: main -format : rose -loop: 0 - - - -original() -print diff --git a/examples/chill/jacobi1.c b/examples/chill/jacobi1.c deleted file mode 100644 index 0fcaee4..0000000 --- a/examples/chill/jacobi1.c +++ /dev/null @@ -1,13 +0,0 @@ -#define N 512 - -int main() { - int i, t; - - float a[N][N]; - - for (t = 2; t <= 100; t++) - for (i = 2; i <= N - 1; i++) - a[t][i] = a[t - 1][i - 1] + a[t - 1][i] + a[t - 1][i + 1]; - - return 0; -} diff --git a/examples/chill/jacobi1.script b/examples/chill/jacobi1.script deleted file mode 100644 index c0dec8d..0000000 --- a/examples/chill/jacobi1.script +++ /dev/null @@ -1,18 +0,0 @@ -# -# tiling perfect jacobi loop nest with time step, use -# unimodular transformation first (only applicable to the -# perfect loop nest) to make tiling legal. -# - -source: jacobi1.c -procedure: main -format : rose -loop: 0 - -print dep - -nonsingular([[1,0],[1,1]]) # unimodular matrix, determinant is one -tile(0,2,64) - -print dep -print diff --git a/examples/chill/jacobi2.c b/examples/chill/jacobi2.c deleted file mode 100644 index b8d8d7b..0000000 --- a/examples/chill/jacobi2.c +++ /dev/null @@ -1,15 +0,0 @@ -#define N 512 - -int main() { - double a[N]; - double b[N]; - int t, i; - for (t = 1; t <= 100; t++) { - for (i = 2; i <= N - 1; i++) - b[i] = (double) 0.25 * (a[i - 1] + a[i + 1]) + (double) 0.5 * a[i]; - - for (i = 2; i <= N - 1; i++) - a[i] = b[i]; - } - return 0; -} diff --git a/examples/chill/jacobi2.script b/examples/chill/jacobi2.script deleted file mode 100644 index afe14c6..0000000 --- a/examples/chill/jacobi2.script +++ /dev/null @@ -1,21 +0,0 @@ -# -# tiling imperfect jacobi loop nest, more details in the paper -# "Automatic Tiling of Iterative Stencil Loops" by Zhiyuan Li and -# Yonghong Song, TOPLAS, 2004. -# - -source: jacobi2.c -procedure: main -format: rose -loop: 0 - -print dep - -original() -shift([1], 2, 1) -fuse([0,1], 2) # optional -skew([0,1], 2, [2,1]) -tile(0, 2, 32, 1) - -print dep -print diff --git a/examples/chill/unroll.c b/examples/chill/unroll.c deleted file mode 100644 index e74dea3..0000000 --- a/examples/chill/unroll.c +++ /dev/null @@ -1,33 +0,0 @@ - -#define N 14 -#define DT 0.314 - -void foo(int n, float* x, float* y, float* z, float* f3, float* f1, float* w) { - - int i, j; - - for (i = 1; i <= 14; i++) - x[i] = 1.0; - - for (i = 1; i <= 14; i += 3) - y[i] = 1.0; - - for (i = N + 1; i <= N + 20; i += 3) - z[i] = 1.0; - - for (i = 0; i <= N; i++) { - for (j = i; j <= i + N; j++) - f3[i] = f3[i] + f1[j] * w[j - i]; - f3[i] = f3[i] * DT; - } - - return 0; -} - -int main() { - float x[N], y[N], z[N], f3[N], f1[N], w[N]; - - foo(N, x, y, z, f3, f1, w); - return 0; -} - diff --git a/examples/chill/unroll.script b/examples/chill/unroll.script deleted file mode 100644 index e64acb6..0000000 --- a/examples/chill/unroll.script +++ /dev/null @@ -1,35 +0,0 @@ -# -# Test unroll-and-jam. The last loop adapted from the simple -# convolution example from p463 of "Optimizing Compilers for -# Modern Architectures", by Randy Allen and Ken Kennedy. -# - -source: unroll.c -procedure: foo -format: rose -# fully unroll a loop with known iteration count -loop: 0 -original() -unroll(0,1,3) -print -print space - - -# a strided loop -loop: 1 -original() -unroll(0,1,2) -print -print space - -# lower and upper bounds are not constant -loop: 2 -original() -unroll(0,1,20) -print - -# parallelogram iteration space -loop: 3 -original() -unroll(0,1,2) -print diff --git a/examples/cuda-chill/cp.c b/examples/cuda-chill/cp.c deleted file mode 100644 index 837d7a6..0000000 --- a/examples/cuda-chill/cp.c +++ /dev/null @@ -1,29 +0,0 @@ -#define N 1 - -#define VOLSIZEY 512 -#define VOLSIZEX 512 -#define VOLSIZEZ 1 -#define ATOMCOUNT 4000 -#define GRIDSPACING 0.1 -#define zDim 0 - -extern float sqrtf(float); - -void cenergy_cpu(float atoms[ATOMCOUNT*4],float *energy,float z) -{ -int i,j,n;float dx,dy,dz; - - for (j=0; j<VOLSIZEY; j++) { - for (i=0; i<VOLSIZEX; i++) { - for (n=0;n<ATOMCOUNT;n+=4) { - dx = (GRIDSPACING * i) - atoms[n]; - dy = (GRIDSPACING * j) - atoms[n+1]; - dz = z - atoms[n+2]; - energy[(j*VOLSIZEX + i)+VOLSIZEX*VOLSIZEY*zDim] += atoms[n+3]/sqrtf( (dx*dx) + (dy*dy)+ (dz*dz) ) ; - } - - - } - } -} - diff --git a/examples/cuda-chill/cp.lua b/examples/cuda-chill/cp.lua deleted file mode 100644 index 1ef2264..0000000 --- a/examples/cuda-chill/cp.lua +++ /dev/null @@ -1,46 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("cp.c", "cenergy_cpu", 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -V=512 -N=4000 -N=1 - -Tj=32 -Ti=16 -Tii=16 -Tjj=16 - ---normalize_index("j") ---normalize_index("i") -print_code() -normalize_index("n") --- TILE COMMANDS ZEROOOOOOOOOOO:3 ---permute(0,{"i","j","n"}) ---tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j","n"})--CU=-1 -tile_by_index({"j","i"},{Tj,Ti},{l1_control="jj",l2_control="ii"},{"jj","ii","j","i","n"})--CU=-1 ---tile_by_index({"n"},{Tn},{l1_control="nn"},{"jj","ii","nn","j","i","n"})--CU=-1 - ---tile_by_index({"j","i"},{Tjjj,Tiii},{l1_control="jjj",l2_control="iii"},{"jj","ii","nn","jjj","j","iii","i","n"})--CU=3 ---tile_by_index({"i","j"},{Tii,Tjj},{l1_control="iii",l2_control="jjj"},{"ii","jj","i","iii","j","jjj","n"})--CU=3 ---tile_by_index({"j"}, {Tn}, {l1_control="j",l1_tile="jjj"}, {"ii", "jj", "nn","jjj","j","i","n"}) ---tile_by_index({"i"}, {Tii}, {l1_control="iii",l1_tile="i"}, {"ii", "jj", "iii","i","j","n"}) -print_code() -cudaize("kernel_GPU",{atoms=N*4,energy=V*V*1},{block={"jj","ii"}, thread={"j","i"}})--CU=3 ---cudaize("kernel_GPU",{atoms=N*4,energy=V*V*1},{block={"ii","jj"}, thread={"i","j"}})--CU=3 -print_code() -copy_to_shared("tx","atoms",-16) -copy_to_registers("tx","energy") ---copy_to_texture("atoms") ---unroll_to_depth(1) ---unroll(0,9,0) ---unroll(0,5,0) - ---unroll(0,8,256) -print_code() diff --git a/examples/cuda-chill/cudaize.lua b/examples/cuda-chill/cudaize.lua deleted file mode 100644 index 7359cca..0000000 --- a/examples/cuda-chill/cudaize.lua +++ /dev/null @@ -1,1004 +0,0 @@ - --- THIS IS CUDAIZE.LUA - -function table.contains_key(table, key) - for k in pairs(table) do - if k == key then - return true - end - end - return false -end - -function valid_indices(stmt, indices) - --print( "valid_indices() lua calling C cur_indices") - --io.flush() - cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - for idx in pairs(indices) do - if not table.contains_key(cur,idx) then - return false - end - end - return true -end - -function next_clean_level(cur_idxs,level) - --print("next_clean_level( ..., "..level.." )") - --print(string.format("indices_at_each_level %s ",list_to_string(cur_idxs) )) - - --print("loop to "..#cur_idxs) - for i=level+1,#cur_idxs do - --print("Checking level "..i.." = '"..cur_idxs[i].."'") - if (# cur_idxs[i] > 0) then - --print("Good enough"..(# cur_idxs[i])) - --print("returning "..i) - return i - end - end - return -1 --sentinal that there were no non-dummy indices left -end - -function build_order(final_order, tile_idx_names, ctrl_idx_names, tile_idx_map, cur_level) - order = {} - --print("\nbuild_order()") - --print("build_order(): final_order = ( "..list_to_string(final_order).." )") - --print("build_order(): ctrl_idx_names = ("..list_to_string(ctrl_idx_names).." )") - --print("cur_level "..cur_level.."") - --io.flush() - - for i,k in ipairs(final_order) do - skip = false - cur = final_order[i] - --print("\ncur "..cur.." = final_order["..i.."] = "..final_order[i].." ") - --control loops below our current level should not be in the current order - for j=cur_level+2,# ctrl_idx_names do - --print("j "..j.." final_order["..i.."] = "..final_order[i].." ") - if ctrl_idx_names[j] == final_order[i] then - skip = true - --print("SKIP "..final_order[i].." ") - --io.flush() - end - end - --possibly substitute tile indices ifn necessar - if table.contains_key(tile_idx_map,final_order[i]) then - approved_sub = false - sub_string = tile_idx_map[final_order[i]] - for j=cur_level+2,# tile_idx_names do - if tile_idx_names[j] == sub_string then - approved_sub = true - end - end - if approved_sub then - cur = sub_string - end - end - if not skip then - table.insert(order,cur) - end - end - return order -end - -function list_to_string(str_list) - --Helpful debug output - l = "" - for i,str in ipairs(str_list) do - if i > 1 then - l = l .. ", " .. str - else - l = str - end - end - return l -end - - -function find_cur_level(stmt,idx) - --Search cur_indices for a idx at stmt - cur = cur_indices(stmt) - --print(string.format("find_cur_level(stmt %d, idx %s) Cur indices %s", stmt, idx, list_to_string(cur))) - for i,cidx in ipairs(cur) do - if cidx == idx then - --print(string.format("found it at index %d", i)) - return i - end - end - error("Unable to find "..idx.." in current list of indices") -end - - -function chk_cur_level(stmt,idx) - --Search cur_indices for a idx at stmt - cur = cur_indices(stmt) - for i,cidx in ipairs(cur) do - if cidx == idx then - return i - end - end - return -1 -end - - -function find_offset(cur_order, tile, control) - --print("Looking for tile '"..tile.."' and control '"..control.."' in ( "..list_to_string(cur_order)..", )") - idx1 = -1 - idx2 = -1 - for i,cur in ipairs(cur_order) do - if(cur == tile) then - idx1 = i - end - if(cur == control) then - idx2 = i - end - end - if(idx1 < 0) then - error("Unable to find tile " .. tile .. " in current list of indices") - end - if(idx2 < 0) then - error("Unable to find control " .. control .. " in current list of indices") - end - --print("found at level " .. idx2 .. " and " .. idx1) - if(idx2 < idx1) then - return idx2-idx1+1 - else - return idx2-idx1 - end -end - -function tile_by_index(tile_indices, sizes, index_names, final_order, tile_method) - --print "STARTING TILE BY INDEX" - --io.flush() - stmt = 0 --assume stmt 0 - cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - if not valid_indices(stmt,tile_indices) then - error('One of the indices in the first parameter were not '.. - 'found in the current set of indices.') - end - if not tile_method then tile_method = counted end - tile_idx_names = {} - for i,s in ipairs(tile_indices) do tile_idx_names[i]=s end --shallow copy - --print("tile_index_names: ['"..list_to_string(tile_indices).."']") - - --print("index_names: ") - --for k,v in pairs(index_names) do print(k,v) end - - --io.flush() - - ctrl_idx_names = {} - tile_idx_map = {} - for k,v in pairs(index_names) do - valid = false - if(string.sub(k,1,1) == "l") then - if string.sub(k,-8) == "_control" then - i = tonumber(string.sub(k,2,-9)) - if i and i >= 1 and i <= (# tile_indices) then - ctrl_idx_names[i] = v - --print(string.format("Handling control %s for loop level %d",v,i)) - --print("control "..k.." name "..v.." ") - valid = true - end - elseif string.sub(k,-5) == "_tile" then - i = tonumber(string.sub(k,2,-6)) - if i and i >= 1 and i <= (# tile_indices) then - --print(string.format("tile %s -> %s",tile_indices[i], v)) - tile_idx_names[i] = v - tile_idx_map[v] = tile_indices[i] - --print(string.format("tile %s -> %s",tile_indices[i], v)) - valid = true - end - end - end - if not valid then error(string.format("%s is not a proper key for specifying ".. - "tile or control loop indices\n", k)) end - end - - --filter out control indices (and do name substitution of unprocessed tile indices) for a given level - cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, -1) - permute(stmt, cur_order) - - for i,cur_idx in ipairs(tile_indices) do - --print(string.format("i %d cur_idx %s calling build order ********", i-1, cur_idx)) - cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, i-1) - --Find a offset between tile loop and control loop - -- 0 = control loop one level above tile loop - -- -1 = control loop two levels above tile loop - -- > 0 = tile loop above control loop - -- In the last case, we do two extra tile commands to get the control - -- above the tile and then rely on the final permute to handle the - -- rest - level = find_cur_level(stmt,cur_idx) - offset = find_offset(cur_order, tile_idx_names[i], ctrl_idx_names[i]) - --print(string.format("offset %d", offset)) - - if (offset <= 0) then - --print(string.format("[offset<=0]1tile(%d, %d, %d, %d, %s, %s, %s)",stmt, level, sizes[i], level+offset, tile_idx_names[i], ctrl_idx_names[i], tile_method)) - tile(stmt, level, sizes[i], level+offset, tile_idx_names[i], ctrl_idx_names[i], tile_method) - else - --print(string.format("2tile(%d, %d, %d, %d, %s, %s, %s)", stmt, level, sizes[i], level, tile_idx_names[i], ctrl_idx_names[i], tile_method)) - tile(stmt, level, sizes[i], level, tile_idx_names[i], ctrl_idx_names[i], tile_method);--regular level - --flip tile and control loop - --print(string.format("3tile(%d, %d, %d)",stmt, level+1, level+1)) - tile(stmt, level+1, level+1); - --print(string.format("4tile(%d, %d, %d)",stmt, level+1, level)) - tile(stmt, level+1, level); - --print(string.format("\n[offset>0]tile(%d, %d, %d, %d,%s,%s,%s)",stmt, level, sizes[i], level, tile_idx_names[i], ctrl_idx_names[i], tile_method)) - --print_code() - - end - - --Do permutation based on cur_order - --print "permute based on build order calling build_order()" - --print "cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, i-1)" - cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, i-1) - --print "permute(stmt, cur_order);" - permute(stmt, cur_order); - --print "\nafter permute(), code is:" - --print_code() - end - --print "ENDING TILE BY INDEX" - --print_code() -end - -function normalize_index(index) - stmt = 0 --assume stmt 0cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - l = find_cur_level(stmt, index) - tile(stmt, l, l) - --print(string.format("\n[Normalize]tile(%d, %d, %d)",stmt, l,l)) -end - -function is_in_indices(stmt, idx) - cur = cur_indices(stmt) - for i=0,#cur,1 do - if(cur[i]==idx) then - return true - end - end - return false - -end - - -function copy_to_registers(start_loop, array_name) - - --print("\n\n****** starting copy to registers") - io.flush() - - stmt = 0 --assume stmt 0 - - -- [Malik] first we make sure that tx and ty are consecutive loops in the 2D thread setup, otherwise all levels for subsequent operations are messed up. Start logic. - cur = cur_indices(stmt) - table_Size = table.getn(cur) - - --print(string.format("Cur indices %s,",list_to_string(cur))) - --print(string.format("The table size is %d", table_Size)) - --table.foreach(cur, print) - --print_code() - - level_tx = -1 - level_ty = -1 - if is_in_indices(stmt,"tx") then level_tx = find_cur_level(stmt,"tx") end - if is_in_indices(stmt,"ty") then level_ty = find_cur_level(stmt,"ty") end - --print(string.format("level_tx %d level_ty %d", level_tx, level_ty)) - - ty_lookup_idx = "" - org_level_ty = level_ty - - --if(cur[level_tx+1]~=nil and cur[level_tx+1]~="") then ty_lookup = ty_lookup+1 end - if(cur[level_ty+1]~=nil and cur[level_ty+1]~="") then - --print(string.format("IF cur[%d] = %s", level_ty+1, cur[level_ty+1])) - ty_lookup_idx = cur[level_ty+1] - else - --if cur[level_ty] ~= nil then print(string.format("ELSE ty_lookup_idx = cur[%d] = %s", level_ty, cur[level_ty])) -- TODO - --else print "ELSE (dangerous)" end - ty_lookup_idx = cur[level_ty] -- may assign nil !? - end - --if ty_lookup_idx ~= nil then print(string.format("ty_lookup_idx '%s'", ty_lookup_idx)) -- TODO - --else print "ty_lookup_idx is NIL" - --end - - if level_ty > 0 then - --print(string.format("\ntile3(%d,%d,%d)",stmt,level_ty,level_tx+1)) - tile(stmt,level_ty,level_tx+1) - end - --print_code() - - --print("\ntylookup is %d",ty_lookup) - --exit(0) - -- - cur = cur_indices(stmt) - table_Size = table.getn(cur) - --print(string.format("Cur indices %s,",list_to_string(cur))) - --print("The table size is "..table.getn(cur)) - --table.foreach(cur, print) - - if is_in_indices(stmt,"tx") then level_tx = find_cur_level(stmt,"tx") end - if ty_lookup_idx then - if is_in_indices(stmt,ty_lookup_idx) then level_ty = find_cur_level(stmt,ty_lookup_idx) end - end - - ty_lookup = 1 - idx_flag = -1 - -- find the level of the next valid index after ty+1 - --print(string.format("\nlevel_ty %d", level_ty)) - if level_ty > 0 then - --print(string.format("table_Size %d", table_Size)) - for num= level_ty+ty_lookup,table_Size do - --print(string.format("num=%d cur[num] = '%s'",num, cur[num])) - if(cur[num] ~= "") then - idx_flag = find_cur_level(stmt,cur[num]) - --print (string.format("idx_flag = %d", idx_flag)) - break - end - end - end - - --print(string.format("\n(first) I am checking all indexes after ty+1 %s",idx_flag)) - --print_code() - --print "" - - how_many_levels = 1 - startat = idx_flag + 1 - if startat == 0 then startat = 1 end -- avoid attempt to examine an illegal array offset - --print(string.format("idx_flag = %d I will check levels starting with %d", idx_flag, idx_flag+1)) - - for ch_lev = startat,table_Size,1 do -- was for ch_lev = idx_flag+1,table_Size,1 do - --print(string.format("ch_lev %d", ch_lev)) - if(cur[ch_lev] ~= nil and cur[ch_lev] ~= "") then - --print(string.format("cur[%d] = '%s'", ch_lev, cur[ch_lev])) - how_many_levels = how_many_levels+1 - end - end - --print("\nHow Many Levels",how_many_levels) - - -- change this all to reflect the real logic which is to normalize all loops inside the thread loops. - if(how_many_levels <2) then - while( idx_flag >= 0) do - for num = level_ty+ty_lookup,(table_Size) do - --print(string.format("at top of loop, num is %d", num)) - --print(string.format("num %d", num)) - --print(string.format("cur[num] = '%s'", cur[num])) - if(cur[num] ~= "") then - idx=cur[num] - --print(string.format("idx '%s'", idx)) - - curlev = find_cur_level(stmt,idx) - --print(string.format("curlev %d", curlev)) - - --print_code() - --print(string.format("\n[COPYTOREG]tile(%d,%d,%d)",stmt,find_cur_level(stmt,idx),level_tx)) - tile(stmt,find_cur_level(stmt,idx),find_cur_level(stmt,idx)) - curlev = find_cur_level(stmt,idx) - --print(string.format("curlev %d", curlev)) - tile(stmt,find_cur_level(stmt,idx),level_tx) - --print(string.format("hehe '%s'",cur[num])) - - cur = cur_indices(stmt) - --print("Cur indices INSIDE"..list_to_string(cur)) - table_Size = table.getn(cur) - --print(string.format("Table Size is: %d",table_Size)) - level_tx = find_cur_level(stmt,"tx") - --print(string.format("\n level TX is: %d",level_tx)) - level_ty = find_cur_level(stmt,ty_lookup_idx) - --print(string.format("\n level TY is: %d",level_ty)) - idx_flag = -1 - --print "idx_flag = -1" - - -- find the level of the next valid index after ty+1 - - -- the following was num, which conflicts with loop we're already in, and otherwise wasn't used (?) - for num= level_ty+ty_lookup,table_Size do - --print(string.format("num mucking num = %d", num)) - if(cur[num] ~= nil and cur[num] ~= "") then - idx_flag = find_cur_level(stmt,cur[num]) - --print("\n(second) I am checking all indexes after ty+1 %s",cur[num]) - break - end - end - --print(string.format("num mucked to %d idx_flag = %d", num, idx_flag)) - - end - --print(string.format("at bottom of loop, num is %d", num)) - end - end - end - --print "done with levels" - - - - - --print "ARE WE SYNCED HERE?" - --print_code() - --print("\ntile(%d,%d,%d)",stmt,level_k,level_k) - --tile(stmt,level_k,level_k) - - -- [Malik] end logic - --print_code() - start_level = find_cur_level(stmt, start_loop) - --We should hold contant any block or tile loop - block_idxs = block_indices() - thread_idxs = thread_indices() - --print("\nblock indices are") - --table.foreach(block_idxs, print) - --print("\nthread indices are") - --table.foreach(thread_idxs, print) - --print(string.format("\nStart Level: %d",start_level)) - - hold_constant = {} - --print("\n Now in Blocks") - for i,idx in ipairs(block_idxs) do - --print(string.format("\n Idx:%s : Level: %d",idx,find_cur_level(stmt,idx))) - if find_cur_level(stmt,idx) >= start_level then - table.insert(hold_constant, idx) - --print(string.format("\nJust inserted block %s in hold_constant",idx)) - end - end - - - --print("\n Now in Threads") - for i,idx in ipairs(thread_idxs) do - --print(string.format("\n Idx:%s : Level: %d",idx,find_cur_level(stmt,idx))) - if find_cur_level(stmt,idx) >= start_level then - table.insert(hold_constant, idx) - --print(string.format("\nJust inserted thread %s in hold_constant",idx)) - end - end - - --print "\nhold constant table is: " - --table.foreach(hold_constant, print) - - --print("\nbefore datacopy pvt") - old_num_stmts = num_statements() - --print_code() - --print(string.format("\n[DataCopy]datacopy_privatized(%d, %s, %s, vector having privatized levels)",stmt, start_loop, array_name)) - --table.foreach(hold_constant, print) - datacopy_privatized(stmt, start_loop, array_name, hold_constant) - - --print(hold_constant) - new_num_stmts = num_statements() - --print("\nthe num of statements:%d\n",new_num_stmt) - --print_code() - --exit(0) - -- [Malik] normalize the copy loops created. - cur = cur_indices(old_num_stmts) - --print("Cur indices "..list_to_string(cur)) - for cidx,i in ipairs(cur) do - if i ~= "tx" and i~="ty" and i~="bx" and i~="by" then - --tile(old_num_stmts,find_cur_level(old_num_stmts,i),find_cur_level(old_num_stmts,i)) - --print("\nTILE OF REG: tile(%d,%d,%d)",old_num_stmts,find_cur_level(old_num_stmts,i),find_cur_level(old_num_stmts,i)) - end - end - --print_code() - --print("\nthe num of statements OLD+1 :",(old_num_stmts+1)) - - ---[[ - is this commented out? why yes, yes it is block comment - if( (old_num_stmts+1) <= new_num_stmts) then - cur = cur_indices(old_num_stmts+1) - --print("Cur indices+1 "..list_to_string(cur)) - for cidx,i in ipairs(cur) do - if i ~= "tx" and i~="ty" and i~="bx" and i~="by" then - tile(old_num_stmts+1,find_cur_level(old_num_stmts+1,i),find_cur_level(old_num_stmts+1,i)) - --print("\nTILE OF REG: tile(%d,%d,%d)",old_num_stmts+1,find_cur_level(old_num_stmts+1,i),find_cur_level(old_num_stmts+1,i)) - end - end - end ---]] - - - --Unroll to the last thread level - --for stmt=old_num_stmts,new_num_stmts-1 do - -- level = find_cur_level(stmt,thread_idxs[#thread_idxs])--get last thread level - --if level < #cur_indices(stmt) then - -- unroll(stmt,level+1,0) - --print(string.format("\n[Unroll]unroll(%d, %d, 0)",stmt, level+1)) - ----print_code() - --end - --end - io.flush() - --print("****** ending copy to registers\n\n") - --io.flush() -end - -function copy_to_shared(start_loop, array_name, alignment) - --print(string.format("\nstarting copy to shared(%s, %s, %d )",start_loop,array_name,alignment)) - stmt = 0 --assume stmt 0 - cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - - start_level = find_cur_level(stmt, start_loop) - --print(string.format("start_level %d", start_level)) - - old_num_stmts = num_statements() - --print(string.format("old_num_statements %d", old_num_stmts)) - - --Now, we give it indices for up to two dimentions for copy loop - copy_loop_idxs = {"tmp1","tmp2"} - --print(string.format("\n[DataCopy]datacopy(%d, %d, %s, {\"tmp1\",\"tmp2\"},false,0,1,%d,true)",stmt, start_level, array_name, alignment)) - datacopy(stmt, start_level, array_name, copy_loop_idxs, false, 0, 1, alignment,true) - - add_sync(stmt,start_loop) - new_num_stmts = num_statements() - - --This is fairly CUBLAS2 specific, not sure how well it generalizes, - --but for a 2D copy, what we want to do is "normalize" the first loop - --"tmp1" then get its hard upper bound. We then want to tile it to - --make the control loop of that tile "ty". We then tile "tmp2" with a - --size of 1 and make it "tx". - --print(string.format("fairly CUBLAS2 specific, OLD %d NEW %d", old_num_stmts, new_num_stmts )) - - for stmt=old_num_stmts,new_num_stmts-1 do - --print(string.format("for stmt = %d", stmt)) - was_no_error, level = pcall(find_cur_level, stmt, "tmp2") - - if was_no_error then - --print_code() - --print("\nCopy to shared: [If was no error]\n") - find_cur_level(stmt,"tmp2") - tile(stmt, level, level) - - lower,upper = hard_loop_bounds(stmt, level) - upper = upper + 1 - --print(string.format("lower %d upper %d", lower, upper)) - - tx,ty = thread_dims() - --print("2-loop cleanup: lower, upper: "..lower..", "..upper..", tx: "..tx) - - level = find_cur_level(stmt,"tmp1") - --print(string.format("level %d", level)) - - if tx == upper and ty == 1 then - --print(string.format("tx = %d upper = %d ty = %d", tx, upper, ty)) - --print "Don't need" - - --Don't need an extra tile level, just move this loop up - second_level = find_cur_level(stmt,"tmp2") - --print(string.format("\n[Tile0]tile(%d, %d, 1, %d,%s,%s,counted)",stmt, second_level, level, "tx", "tx")) - tile(stmt, second_level, 1, level, "tx", "tx", counted) - else - --print "DO need?" - --print_code() - if(ty == 1) then new_ctrl = "tmp3" else new_ctrl = "ty" end - - ---[[ Commenting out a block of Gabe's code in this control flow - -- level = find_cur_level(stmt,"tmp1") - tile(stmt, level, level) - - lower,upper = hard_loop_bounds(stmt, level) - upper = upper + 1 - --print_code() - --print("2-loop cleanup: lower, upper: "..lower..", "..upper..", tx: "..tx..", level: "..level) - if(math.ceil(upper/ty) > 1)then - tile(stmt, level, math.ceil(upper/ty), level, "tmp", new_ctrl, counted) - --print(string.format("\n[Tile1]tile(%d, %d, %f[%d,%d], %d,%s,%s,counted)",stmt, level, math.ceil(upper/ty),upper,ty, level, "tmp", new_ctrl)) - else - tile(stmt, level, math.ceil(upper/ty), level, "ty", new_ctrl, counted) - --print(string.format("\n[Tile1]tile(%d, %d, %f[%d,%d], %d,%s,%s,counted)",stmt, level, math.ceil(upper/ty),upper,ty, level, "tx", new_ctrl)) - end - - --print_code() - -- [Malik] If here we have the loop upper bound > tx, then we should tile once more after the next tile, to carve out the correct tx. - lower1,upper1 = hard_loop_bounds(stmt,level) - level1 = level - stmt1 = stmt - -- [Malik] Do the tile after the second level tile with if condition. Just to keep the original order, the tile is being pushed to the end. - - --print("[Malik]-loop cleanup: lower1, upper1: "..lower1..", "..upper1..", tx: "..tx..", level:"..level1) - - --print_code() - --level = find_cur_level(stmt,"tmp") - --tile(stmt,level,level) - --print_code() - - --[Malik] if you are moving the loop above the level1, you need to update level1 with new position which would be level1+2 or second_level - if(level <= level1) then level1 = level1+2 end - --print(string.format("\n[Tile2]tile(%d, %d, 1, %d,%s,%s,counted)",stmt, second_level, level, "tx", "tx")) - --print("\n----------------------------------") - --print_code() - --print("\n**********************************") - --print("[Malik]-loop cleanup: lower1, upper1: "..lower1..", "..upper1..", tx: "..tx..", level:"..level1) - -- [Malik] If the upper bound > tx, we do another tile to carve out the correct tx from a bigger loop. Else just normalize the bounds. - if( upper1 > ty) then - third_level = find_cur_level(stmt1,"tmp") - --print("\n\n\n\t\t\t\tthirdlevel:"..third_level) - tile(stmt1, third_level, ty, third_level, "ty", "tmp", counted) - --print(string.format("\n[Tile3]tile(%d, %d, %d,%d,%s,%s,counted)",stmt1, third_level, ty,third_level, "ty", "tmp")) - tile(stmt1,third_level+1,third_level+1) - --print(string.format("\n[Tile3]tile(%d, %d, %d)",stmt1, third_level+1, third_level+1)) - tile(stmt1,third_level+1,third_level) - --print(string.format("\n[Tile3]tile(%d, %d, %d)",stmt1, third_level+1, third_level)) - else - tile(stmt1,level1,level1) - --print(string.format("\n[Tile3ELSE]tile(%d, %d, %d)",stmt1,level1,level1)) - end - - --print("\nStarting tmp2\n");--print_code(); - second_level = find_cur_level(stmt,"tmp2") - lower,upper = hard_loop_bounds(stmt,second_level) - level = second_level - --print("[Malik]-loop cleanup@tmp2: lower, upper: "..lower..", "..upper..", tx: "..tx..", level:"..level) - - if(math.ceil(upper/tx) > 1)then - tile(stmt, second_level,math.ceil(upper/tx), level, "tmp", "tx", counted) - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, second_level,math.ceil(upper/tx),second_level, "tmp", "tx")) - else - tile(stmt, second_level,math.ceil(upper/tx), level, "tx", "tx", counted) - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, second_level,math.ceil(upper/tx),second_level, "tx", "tx")) - end - --print_code() - lower2,upper2 = hard_loop_bounds(stmt,level) - level2 = level - stmt2 = stmt - --print("[Malik]-loop cleanup@tmp2: lower2, upper2: "..lower2..", "..upper2..", tx: "..tx..", level:"..level2) - -- now for the second level. - if( upper2 > tx) then - forth_level = find_cur_level(stmt2,"tmp") - --print("\n\n\n\t\t\t\tforthlevel:"..forth_level) - --print_code() - tile(stmt2, forth_level, 1, forth_level, "tx", "tmp", counted) - --print(string.format("\n[Tile3B]tile(%d, %d, %d,%d,%s,%s,counted)",stmt2, forth_level, tx,forth_level, "ty", "tmp")) - --print_code() - --tile(stmt2,forth_level+1,forth_level+1) - --print(string.format("\n[Tile3B]tile(%d, %d, %d)",stmt2, forth_level+1, forth_level+1)) - --tile(stmt2,forth_level+1,forth_level) - --print(string.format("\n[Tile3B]tile(%d, %d, %d)",stmt2, forth_level+1, forth_level)) - else - new_level = find_cur_level(stmt2,"ty") - tile(stmt2,level2,1,new_level,"tx","tx",counted) - --print(string.format("\n[Tile3BELSE]tile(%d, %d, %d)",stmt2,level2,level2)) - tmp_level = find_cur_level(stmt2,"tmp") - tile(stmt2,tmp_level,tmp_level) - end - - --print_code() - --print("\n----------------------------------") ---]] - - --print_code() - --print("\nStarting tmp2\n");--print_code(); - first_level = find_cur_level(stmt,"tmp1") - second_level = find_cur_level(stmt,"tmp2") - lower,upper = hard_loop_bounds(stmt,second_level) - - --print("[Malik]-loop cleanup@tmp2: lower, upper: "..lower..", "..upper..", tx: "..tx..",first level:"..first_level..",second_level:"..second_level) - - -- Move the fastest changing dimension loop to the outermost,identified by "tmp2" and to be identified as tx. - --print(string.format("\n[fastest]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, second_level,1,first_level, "tx", "tx")) - tile(stmt,second_level,1,first_level,"tx","tx",counted) - --print_code() - - first_level = find_cur_level(stmt,"tmp1") - lower_1,upper_1 = hard_loop_bounds(stmt,first_level) - tx_level = find_cur_level(stmt,"tx") - lower_tx,upper_tx = hard_loop_bounds(stmt,tx_level) - --print(string.format("UL_1 %d %d UL_tx %d %d", lower_1, upper_1, lower_tx, upper_tx)) - - if(math.ceil(upper_tx/tx) > 1)then - --print "ceil I say" - --print(string.format("\n[Tile1]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, tx_level,tx,tx_level, "tx", "tmp1")) - tile(stmt,tx_level,tx,tx_level,"tx","tmp_tx",counted) - --print_code() - - peat = find_cur_level(stmt,"tx") - --print(string.format("\n[Tile1]tile(%d, %d, %d)",stmt, peat, peat)) - tile(stmt, peat, peat ) --find_cur_level(stmt,"tx"),find_cur_level(stmt,"tx")) - --print_code() - - if (find_cur_level(stmt,"tx")>find_cur_level(stmt,"tmp_tx")) then - --print(string.format("\nagain [Tile1]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx"))) - tile(stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx")) - --print_code() - end - --else - --tile(stmt, tx_level,1, tx_level, "tx", "tx", counted) - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, tx_level,1,tx_level, "tx", "tx")) - end - --print_code() - --]] -- this apparently is NOT the end of a block comment - - --print("\nStarting tmp1\n") - -- Handle the other slower changing dimension, the original outermost loop, now identified by "tmp1", to be identified as "ty". - tile(stmt,find_cur_level(stmt,"tmp1"),find_cur_level(stmt,"tmp1")) - --print_code() - - ty_level = find_cur_level(stmt,"tmp1") - lower_ty,upper_ty = hard_loop_bounds(stmt,ty_level) - - tx_level = find_cur_level(stmt,"tx") - lower_tx,upper_tx = hard_loop_bounds(stmt,tx_level) - --print("[Malik]-loop cleanup@tmp1: lowerty, upperty: "..lower_ty..", "..upper_ty..", ty: "..ty..",ty level:"..ty_level..",tx_level:"..tx_level..", stmt: "..stmt) - - --print "before ceil" - if(math.ceil(upper_ty/ty) > 1)then - --print "CEIL IF" - --print("\n Inside upper_ty/ty > 1\n"); - - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, ty_level,ty,ty_level, "ty", "tmp_ty")) - tile(stmt,ty_level,ty,ty_level,"ty","tmp_ty",counted) - --print_code() - - --print(string.format("\n[Tile2-1]tile(%d, %d, %d)",stmt,find_cur_level(stmt ,"ty"),find_cur_level(stmt,"ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"ty")) - --print_code() - - ----------------------------------------------------------------------- - ---------------------------------------------------------------------- - cur_idxs = cur_indices(stmt) - --print("\n cur indexes are "..list_to_string(cur_idxs)) - - -- Putting ty before any tmp_tx - idx_flag = -1 - for num= 0,table.getn(cur_idxs) do - if(cur[num] == "tmp_tx") then - idx_flag = find_cur_level(stmt,cur[num]) - break - end - end - --print(string.format("\n (1) so i have found out the value of idx flag as %d",idx_flag) ) - - if(idx_flag >=0 ) then - if (find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty")) then - --print(string.format("\n[Tile2-2]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - --print_code() - end - end - - -- Now Putting ty before any tmp_ty - idx_flag = -1 - for num= 0,table.getn(cur_idxs) do - if(cur[num] == "tmp_ty") then - idx_flag = find_cur_level(stmt,cur[num]) - break - end - end - --print(string.format("\n IF so i have found out the value of idx flag as %d",idx_flag) ) - if(idx_flag >=0 ) then - --print "one more test" - if ((find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty"))) then - --print(string.format("\n[Tile2-2]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - --print_code() - end - end - else - --print "CEIL ELSE" - --cur_idxs = cur_indices(stmt) - --print("\n Inside upper_ty/ty <= 1\n"); - - --print(string.format("\n[Tile3]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, ty_level,1,ty_level, "ty", "ty")) - tile(stmt, ty_level,1, ty_level, "ty", "ty", counted) - --print_code() - - --print(string.format("\n[Tile3-1]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1)) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1) - --print_code() - - idx_flag = -1 - if(cur_idxs) then - --print "CAN NEVER GET HERE? cur_idxs" - for num= 0,table.getn(cur_idxs) do - if(cur[num] == "tmp_ty") then - idx_flag = find_cur_level(stmt,cur[num]) - break - end - end - end - --print(string.format("\n ELSE so i have found out the value of idx flag as %d",idx_flag) ) - if(idx_flag >=0 ) then - if (find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty")) then - --print(string.format("tile( stmt %d, level ty %d, level ty %d",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - --print(string.format("\n[Tile3-2]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - end - end - end - - --print_code() - end - - - --print "\n\n *** at bottom of if in copy to shared, " - --print_code() - --print "end of if" - - else - --copy to shared only created one level, not two, so we use a different approach (MV & TMV) - --print("\nCopy to shared: [If was error]\n") - level = find_cur_level(stmt,"tmp1") - tile(stmt, level, level) - - --print(string.format("\n[Tile]tile(%d, %d, %d)",stmt, level, level)) - tx,ty = thread_dims() - lower,upper = hard_loop_bounds(stmt, level) - upper = upper+1 --upper bound given as <=, compare to dimensions tx which is < - --print("upper "..upper.." tx "..tx) - if upper == tx then - rename_index(stmt, "tmp1", "tx") - else - --print("upper is not tx") - --TODO: Don't know, maybe do some tileing etc - --print_code() - --print("upper "..upper.." tx "..tx.." stmt: "..stmt.." level: "..level) - tile(stmt, level,tx,level, "tx", "tmp_tx", counted) - --print_code() - - --print("stmt:"..stmt.." level+1: "..level+1) - --print("TILE 7") - tile(stmt, level+1,1,level+1,"tx", "tx",counted) - --print("TILE 3") - tile(stmt,level+1,level) - --print_code() - - if(ty > 1) then - --print_code() - --print("GOING IN") - lower,upper = hard_loop_bounds(stmt, level+1) - --print(string.format("ty %d lower %d upper %d", ty, lower, upper)) - --upper=125 - --print("NOW FOR Y: upper "..upper.." ty "..ty.." stmt: "..stmt.." level: "..(level+1).." bound:"..math.ceil(upper/ty)) - tile(stmt, level+1,math.ceil(upper/ty),level+1, "tmp_ty", "ty", counted) - --tile(stmt, level+2,math.ceil(upper/ty),level+2, "tmp_ty", "ty", counted) - end - --print_code() - --rename_index(stmt, "tmp1", "tx") - --print("Warning: Need to implement some logic here to tile the single level shared copy loop to match thread dimensions") - end - end - --Always add sync - add_sync(stmt,start_loop) - - end - --print("ending copy to shared\n") - --print_code() -end - -function unroll_to_depth(max_depth) - --print(string.format("\n\nunroll_to_depth(%d)", max_depth )) - --print "SYNC UP" - - cur = cur_indices(0) - thread_idxs = thread_indices() - guard_idx = thread_idxs[#thread_idxs] - - --print(string.format("cur indices %s",list_to_string(cur))) - --print(string.format("thread indices %s",list_to_string(thread_idxs))) - --print(string.format("#thread_idxs = %d", #thread_idxs)) - --print(string.format("guard_idx = %s", guard_idx)) - - ---- HERE FIND OUT THE LOOPS WHICH ARE COMMON BETWEEN STATEMENTS - common_loops = {} - comm_loops_cnt = 0 - num_stmts = num_statements() - --print(string.format("num statements %d", num_stmts)) - - for stmt=0,num_stmts-1 do - cur_idxs = cur_indices(stmt) - - --print(string.format("\nSTMT %d Current Indices: %s",stmt,list_to_string(cur_idxs))) - - if(chk_cur_level(stmt,"tx")>0) then - for ii=1,find_cur_level(stmt,"tx")-1 do -- started at 0 - --print(string.format("ii = %d", ii)) -- index starts at 1, what does index 0 do? - --if cur_idxs[ii] == nil then print "cur_idxs[i]] is NIL" - --else print(string.format("cur_idxs[%d] = '%s'", ii, cur_idxs[ii])) -- index starts at 1, what does index 0 do? - --end - - if(cur_idxs[ii] ~= "bx" and cur_idxs[ii] ~= "by" and cur_idxs[ii] ~= nil and cur_idxs[ii] ~= "tx" and cur_idxs[ii] ~= "ty" and cur_idxs[ii] ~= "") then - - --print(string.format("id %s is not in the list", cur_idxs[ii] )) - - for stmt1=stmt+1,num_stmts-1 do - --print(string.format("\nii %d stmt1 is %d", ii, stmt1)) - cur_idxs1 = cur_indices(stmt1) - --print("\nstmt1 cur_idxs1 is "..list_to_string(cur_idxs1)) - - --print(string.format("cur level(%d, %s) = %d", stmt, "tx", find_cur_level(stmt,"tx"))) - - endrange = find_cur_level(stmt,"tx")-1 - --print(string.format("for iii=1, %d do", endrange)) - - for iii=1,find_cur_level(stmt,"tx")-1 do -- started at 0 - --print(string.format("stmt %d ii %d iii %d ", stmt, ii, iii)) - --if(cur_idxs1[iii] ~= nil) then - -- print(string.format("stmt %d ii %d iii %d cur_idxs1[%d] = '%s'", stmt, ii, iii, iii, cur_idxs1[iii])) - --else - -- print(string.format("stmt %d ii %d iii %d cur_idxs1[%d] = NIL", stmt, ii, iii, iii)) - --end - - if(cur_idxs1[iii] ~= "bx" and cur_idxs1[iii] ~= "by" and cur_idxs1[iii] ~= nil and cur_idxs1[iii] ~= "tx" and cur_idxs1[iii] ~= "ty" and cur_idxs1[iii] ~= "") then - if(cur_idxs[ii] == cur_idxs1[iii]) then - --print("\nfound idx:"..cur_idxs[ii]) - --if(comm_loops_cnt == 0) then print "\n\n*** WARNING *** assigning to array index ZERO in Lua" end - common_loops[comm_loops_cnt] = cur_idxs[ii] - --print(string.format("cl[%d] = '%s'", comm_loops_cnt, common_loops[comm_loops_cnt])) - comm_loops_cnt = comm_loops_cnt + 1 - end - end - end - end - end - end - end - end - ---- - --if(comm_loops_cnt>0) then - -- print("\n COMM LOOPS :TOTAL "..comm_loops_cnt..", and are "..list_to_string(common_loops).." this loop :"..common_loops[0]) - --else - -- print "UNROLL can't unroll any loops?" - --end - - - - - repeat - old_num_stmts = num_statements() - --print(string.format("old_num_statements %d", old_num_stmts)) - - for stmt=0,old_num_stmts-1 do - cur_idxs = cur_indices(stmt) - --print(string.format("stmt %d cur_idxs = %s", stmt, list_to_string(cur_idxs))) - if(#cur_idxs > 0) then - gaurd_level = -1 - if(chk_cur_level(stmt,guard_idx)>0) then - gaurd_level = find_cur_level(stmt,guard_idx) - end - --print(string.format("guard_level(sp) = %d", gaurd_level)) - - if(gaurd_level>-1) then - level = next_clean_level(cur_idxs,gaurd_level) - --print(string.format("next clean level %d", level)) - - --need to handle max_depth - num_unrolled = 0 - level_unroll_comm = level - level_arr = {} - while level >= 0 do - --print(string.format("while: level = %d", level)) - - if num_unrolled == max_depth then break end - --print("Unrolling "..stmt.." at level "..(level).." index ".. cur_idxs[gaurd_level+1]) - - level_arr[num_unrolled] = level - num_unrolled = num_unrolled + 1 - - guard_level = find_cur_level(stmt,guard_idx) - level = next_clean_level(cur_idxs,level+1) - end - --dies print("How many levels for unroll commands"..table.getn(level_arr).." which is "..level_arr[0].." and "..level_arr[#level_arr]) - --if(table.getn(level_arr) ~= nil) then - - --print "OK, NOW WE UNROLL" - - if(level_unroll_comm >= 0)then - for i = table.getn(level_arr),0,-1 do - --print(string.format("\ni=%d", i)) - --print(string.format("[Unroll]unroll(%d, %d, 0)",stmt, level_arr[i])) - - unroll(stmt,level_arr[i],0) - --print("finished unroll]]\n") - --print_code() - end - end ------- - end ---[[ - -THERE WAS A BIG BLOCK OF COMMENTED OUT CODE HERE - - ---]] ------- - end - end - new_num_stmts = num_statements() - - until old_num_stmts == new_num_stmts - -end - - diff --git a/examples/cuda-chill/cudaize.py b/examples/cuda-chill/cudaize.py deleted file mode 100755 index ffef009..0000000 --- a/examples/cuda-chill/cudaize.py +++ /dev/null @@ -1,1047 +0,0 @@ -#! /usr/bin/python - -# THIS IS CUDAIZE.PY - -import chill -import sys -import math - -strided = 0 -counted = 1 - -def print_code(): - chill.print_code() - print "" - sys.stdout.flush() - - -def table_contains_key( table, key ): # use a dict for the 'table'? - return table.has_key(key) # (key in table)? - -def print_array( arr ): # a useful function to mimic lua output - for a in arr[:-1]: - print "%s," % a, - print "%s" % arr[-1] - sys.stdout.flush() - -def valid_indices( statement, indices ): - #print "valid_indices() python calling C cur_indices" - #print statement - cur = chill.cur_indices(statement) # calls C - #print "python valid_indices(), cur = ", - #print cur - #print "indices = ", - #print indices - - for index in indices: - if not index in cur: - return False - return True - -def next_clean_level( indices_at_each_level, level): - #print "next_clean_level( ..., %d )" % level - #print "indices_at_each_level ", - print_array( indices_at_each_level ) - - numlevels = len(indices_at_each_level) - #print "loop to %d" % numlevels - for i in range(level+1, numlevels+1): - pythoni = i-1 # LUA index starts at 1 - #print "Checking level %d = '%s'" % (i, indices_at_each_level[pythoni]) - sys.stdout.flush() - if len(indices_at_each_level[pythoni]) > 0: # LUA INDEX STARTS AT 1 - #print "returning %d" % i - return i # MATCH lua return value, LUA index starts at one - return -1 # no non-dummy indices - - - - -def build_order( final_order, tile_index_names, control_index_names, tile_index_map, current_level): - order = [] - #print "\nbuild_order()" - #print "build_order(): final_order = (", - count = 0 - for f in final_order: - #if count+1 == len(final_order): - # print "%s )" % f - #else: - # print "%s," % f , - count += 1 - - keys = control_index_names.keys() - keys.sort() - #if (2 == len(keys)): - # print "build_order(): ctrl_idx_names = (%s, %s)" % (control_index_names[0], control_index_names[1]) - #else: - # print "build_order(): ctrl_idx_names = (%s" % control_index_names[0], - # for k in keys[1:]: - # print ", %s" % control_index_names[k], - # print ")" - - #print control_index_names - #print "cur_level %d" % current_level - - #print "tile index map: ", - #print tile_index_map - - - for i in range(len(final_order)): - k = final_order[i] # not used? - skip = False - cur = final_order[i] - # control loops below our current level should not be in the current order - - # skip = cur in control_index_names[current_level+2:] - #print "\n%d control_index_names, " % len(control_index_names) - #print control_index_names - - for j in range(current_level+1, len(control_index_names)): - #print "comparing cur %s with cin[%d] %s" % ( cur, j, control_index_names[j]) - if control_index_names[j] == cur: - skip = True - #print "SKIP %s " % cur - - # possibly substitute tile indices if necessary - if tile_index_map.has_key(cur): - approved_sub = False - sub_string = tile_index_map[cur] - #print "sub_string = ", - #print sub_string - - # approved_sub = sub_string in tile_index_names[current_level+2:] - for j in range(current_level+1, len(tile_index_names)): - if tile_index_names[j] == sub_string: - approved_sub = True - if approved_sub: - cur = sub_string - - if not skip: - order.append( cur) - #print "build_order() returning order (", - #print order - #for o in order: - # print "%s," % o, - #print ")" - return order - -def find_cur_level( stmt, idx ): - #print "find_cur_level(stmt %d, idx %s) Cur indices" % ( stmt, idx ), - - cur = chill.cur_indices(stmt) - #for c in cur[:-1]: - # print "%s," % c, - #print "%s" % cur[ -1 ] - - index = 1 # lua starts indices at 1 !! - for c in cur: - if c == idx: - #print "found it at index %d" % index - #sys.stdout.flush() - #print "in find_cur_level, returning ", - #print index - return index - index += 1 - #print "find_cur_level(), Unable to find index %s in" % idx, - #print cur - #print "in find_cur_level, returning -1" - return -1 # special meaning "it's not there" - -def chk_cur_level( stmt, idx ): - # search cur_indices for a ind at stmt - cur = chill.cur_indices(stmt) - if idx in cur: - return 1 + cur.index(idx) # lua index starts at 1 ! - return -1 - -def find_offset( cur_order, tile, control): - #print "Looking for tile '%s' and control '%s' in (" % (tile, control), - #print cur_order - #for o in cur_order: - # print "%s," % o, - #print ")" - - idx1 = -1 - idx2 = -1 - if tile in cur_order: - idx1 = 1 + cur_order.index(tile) # lua indexes from 1! - else: - print "find_offset(), unable to find tile %s in current list of indices" % tile - sys.exit(-1) - - if control in cur_order: - idx2 = 1 + cur_order.index(control) # lua indexes from 1! - else: - print "find_offset(), unable to find control %s in current list of indices" % control - sys.exit(-1) - - #print "found at level %d and %d" % ( idx2, idx1 ) - # this appears horrible - if idx2 < idx1: - return idx2-idx1+1 # bad ordering - else: - return idx2-idx1 - - - -def tile_by_index( tile_indices, sizes, index_names, final_order, tile_method): - #print "STARTING TILE BY INDEX" - #print "tile_by_index() tile_method ", - #print tile_method - #print "index_names: ", - #print index_names - - stmt = 0 # assume statement 0 - if not valid_indices( stmt, tile_indices): - print "python tile_by_index() one or more of ", - print tile_indices, - print " is not valid" - sys.exit(-1) - - if tile_method == None: - #print "CREATING tile_method = 1" - tile_method = 1 # "counted" - - tile_index_names = [] - for ti in tile_indices: - tile_index_names.append( ti ) # make a copy? - #print "tile_index_names:", - #print tile_index_names - - control_index_names = {} # a dictionary? - tile_index_map = {} - - #print "index_names: " - #print index_names - - for pair in index_names: - valid = False - control = pair[0] - name = pair[1] - #print "control %s name %s" % ( control, name ) - - if control[0] == "l" and control[1].isdigit(): - if control.endswith("_control"): - index = int(control[1: -8]) - control_index_names[index-1] = name - valid = True - - elif control.endswith("_tile"): - index = int(control[1: -5]) - #print "index %d" % index - tile_index_names[index-1] = name # ?? - tile_index_map[name] = tile_indices[index-1] - valid = True - if not valid: - print "%s is not a proper key for specifying tile or control loop indices\n" % control - - #print "control_index_names = ", - #print control_index_names - - #print "tile_index_names = ", - #print tile_index_names - - #print "before call to build_order(), tile_index_map = ", - #print tile_index_map - - - # filter out control indices (and do name substitution of unprocessed tile indices) for a given level - cur_order = build_order(final_order, tile_indices, control_index_names, tile_index_map, -1) - - #print "returned from build_order python\n\n" - - # print("permute("..stmt..", {"..list_to_string(cur_order).."})") - #print "permute(%d, {" % stmt, - #print "cur_order = ", - #print cur_order, - #print "})" - - cur_order.insert(0, stmt) - #print cur_order - chill.permute( tuple( cur_order)) - #print "in cudaize.py, returned from C code chill.permute()\n" - - for i in range(len(tile_indices)): - cur_idx = tile_indices[i] - #print "i %d cur_idx %s calling build order ********" % (i, cur_idx) - cur_order = build_order( final_order, tile_indices, control_index_names, tile_index_map, i) - #print "cur_idx %s return from build order" % cur_idx - - # Find an offset between tile loop and control loop - # 0 = control loop one level above tile loop - # -1 = control loop two levels above tile loop - # > 0 = tile loop above control loop - # In the last case, we do two extra tile commands to get the control - # above the tile and then rely on the final permute to handle the - # rest - level = find_cur_level(stmt,cur_idx) - #print "level %d\n" % level - - offset = find_offset(cur_order, tile_index_names[i], control_index_names[i]) - #print "offset %d" % offset - - if offset <= 0: - #print "[offset<=0]1tile(%d, %d, %d, %d, %s, %s, %d)" % (stmt, level, sizes[i], level+offset, tile_index_names[i], control_index_names[i], tile_method ) - chill.tile7( stmt, level, sizes[i], level+offset, tile_index_names[i], control_index_names[i], tile_method ) - #print "in cudaize.py, returned from C code chill.tile7\n" - - else: - #print "2tile(%d, %d, %d, %d, %s, %s, %d)" % (stmt, level, sizes[i], level+offset-1, tile_index_names[i], control_index_names[i], tile_method ) - chill.tile7( stmt, level, sizes[i], level+offset-1, tile_index_names[i], control_index_names[i], tile_method ) # regular level - - # flip and tile control loop - #print "3tile(%d, %d, %d)" % ( stmt, level+1, level+1) - chill.tile3( stmt, level+1, level+1) - - #print "4tile(%d, %d, %d)" % ( stmt, level+1, level) - chill.tile3( stmt, level+1, level) - - #print_code() - - # Do permutation based on cur_order - #print("permute based on build order calling build_order()") - cur_order = build_order(final_order, tile_indices, control_index_names, tile_index_map, i) - - #print("permute based on build order return from build_order()") - - # print("permute("..stmt..", {"..list_to_string(cur_order).."})") - topermute = cur_order - topermute.insert(0, stmt) - chill.permute( tuple(topermute) ) - #print "\nafter permute(), code is:" - #print_code() - -def normalize_index( index ): - #print "in cudaize.py, normalize_index( %s )" % index - stmt = 0 # assume stmt 0 - l = find_cur_level( stmt, index ) - chill.tile3( stmt, l, l ) - -def is_in_indices( stmt, idx): - cur = chill.cur_indices(stmt) - return idx in cur - -def copy_to_registers( start_loop, array_name ): - #print "\n\n****** starting copy to registers" - #sys.stdout.flush() - - stmt = 0 # assume stmt 0 - cur = chill.cur_indices(stmt) # calls C - table_Size = len(cur) - - #print "Cur indices", - #print_array(cur) - #print "\nThe table size is %d" % table_Size - #count=1 - #for c in cur: - # print "%d\t%s" % (count,c) - # count += 1 - - #print_code() - - # would be much cleaner if not translating this code from lua! - level_tx = -1 - level_ty = -1 - if is_in_indices(stmt,"tx"): - level_tx = find_cur_level(stmt,"tx") - if is_in_indices(stmt,"ty"): - level_ty = find_cur_level(stmt,"ty") - #print "level_tx %d level_ty %d" % ( level_tx, level_ty ) - #sys.stdout.flush() - - ty_lookup_idx = "" - org_level_ty = level_ty - - # UGLY logic. Lua index starts at 1, so all tests etc here are off by 1 from the lua code - # level_ty initializes to -1 , which is not a valid index, and so there is added code to - # make it not try to acccess offset -1. -1 IS a valid python array index - # to top it off, the else below can assign a NIL to ty_lookup_idx! - if level_ty != -1 and cur[level_ty] != "": - #print "IF cur[%d] = %s" % ( level_ty, cur[level_ty] ) - ty_lookup_idx = cur[level_ty] - else: - #print "ELSE ty_lookup_idx = cur[%d] = %s" % ( level_ty, cur[level_ty-1]) - ty_lookup_idx = cur[level_ty-1] - #print "ty_lookup_idx '%s'" % ty_lookup_idx - - if level_ty > -1: - #print "\ntile3(%d,%d,%d)" % (stmt,level_ty,level_tx+1) - chill.tile3(stmt,level_ty,level_tx+1) - #print_code() - - cur = chill.cur_indices(stmt) # calls C - table_Size = len(cur) - #print "Cur indices ", - #for c in cur: - # print "%s," % c, - #print "\nThe table size is %d" % len(cur) - #count=1 - #for c in cur: - # print "%d\t%s" % (count,c) - # count += 1 - #sys.stdout.flush() - - if is_in_indices(stmt,"tx"): - level_tx = find_cur_level(stmt,"tx") - if ty_lookup_idx != "": # perhaps incorrect test - if is_in_indices(stmt,ty_lookup_idx): - level_ty = find_cur_level(stmt,ty_lookup_idx) - - ty_lookup = 1 - idx_flag = -1 - # find the level of the next valid index after ty+1 - #print "\nlevel_ty %d" % level_ty - if level_ty > -1: - #print "table_Size %d" % table_Size - for num in range(-1 + level_ty+ty_lookup,table_Size): # ?? off by one? - #print "num=%d cur[num] = '%s'" % (num+1, cur[num]) # num+1 is lua index ???? - sys.stdout.flush() - if cur[num] != "": - idx_flag = find_cur_level(stmt,cur[num]) - #print "idx_flag = %d" % idx_flag - break - - #print "\n(first) I am checking all indexes after ty+1 %s" % idx_flag - #print_code() - #print "" - - how_many_levels = 1 - - #print "idx_flag = %d I will check levels starting with %d" % (idx_flag, idx_flag+1) - # lua arrays start at index 1. the next loop in lua starts at offset 0, since idx_flag can be -1 - # thus the check for "not equal nil" in lua (bad idea) - # python arrays start at 0, so will check for things that lua doesn't (?) - startat = idx_flag + 1 - if idx_flag == -1: - startat = 1 # pretend we're lua for now. TODO: fix the logic - - for ch_lev in range(startat,table_Size+1): # logic may be wrong (off by one) - #print "ch_lev %d" % ch_lev - if ch_lev <= table_Size and cur[ch_lev-1] != "": - #print "cur[%d] = '%s'" % ( ch_lev, cur[ch_lev-1] ) - how_many_levels += 1 - - #print "\nHow Many Levels %d" % how_many_levels - sys.stdout.flush() - sys.stdout.flush() - - if how_many_levels< 2: - while( idx_flag >= 0): - for num in range(level_ty+ty_lookup,table_Size+1): - #print "at top of loop, num is %d" % num - #print "cur[num] = '%s'" % cur[num-1] - if cur[num-1] != "": - idx = cur[num-1] - #print "idx '%s'" % idx - sys.stdout.flush() - curlev = find_cur_level(stmt,idx) - #print "curlev %d" % curlev - - #print "\n[COPYTOREG]tile(%d,%d,%d)"%(stmt,curlev,level_tx) - - chill.tile3(stmt, curlev, curlev) - curlev = find_cur_level(stmt,idx) - #print "curlev %d" % curlev - chill.tile3(stmt,curlev,level_tx) - #print "hehe '%s'" % cur[num-1] - - cur = chill.cur_indices(stmt) - #print "Cur indices INSIDE", - #for c in cur: - # print "%s," % c, - table_Size = len(cur) - #print "\nTable Size is: %d" % len(cur) - - level_tx = find_cur_level(stmt,"tx") - #print "\n level TX is: %d" % level_tx - level_ty = find_cur_level(stmt,ty_lookup_idx) - #print "\n level TY is: %d" %level_ty - idx_flag = -1 - #print "idx_flag = -1" - - - #- find the level of the next valid index after ty+1 - #- the following was num, which conflicts with loop we're already in, and otherwise wasn't used (?) - for num2 in range( -1 + level_ty+ty_lookup ,table_Size): # lua starts index at one - #print "num mucking num = %d" % num2 - if(cur[num2] != ""): - #print "cur[%d] = '%s'" % ( num2, cur[num2] ) - idx_flag = find_cur_level(stmt,cur[num2]) - #print("\n(second) I am checking all indexes after ty+1 %s",cur[num2]) - break - - #print "num mucked to %d idx_flag = %d" % (num, idx_flag) - - #print "at bottom of loop, num is %d" % num - - #print "done with levels" - - # this was a block comment ??? - -# for num in range(level_ty+1, table_Size+1): -# print "num %d" % num -# if cur[num-1] != "": -# idx_flag = find_cur_level(stmt,cur[num-1]) ## ugly -# print "idx_flag = %d" % idx_flag - - # change this all to reflect the real logic which is to normalize all loops inside the thread loops. -# print "change this all ...\n" -# print "level_ty+1 %d table_Size-1 %d idx_flag %d" %( level_ty+1, table_Size-1, idx_flag) -# sys.stdout.flush() -# sys.stdout.flush() - -# while level_ty+1 < (table_Size-1) and idx_flag >= 0: -# print "*** level_ty %d" % level_ty -# for num in range(level_ty+2,table_Size+1): # lua for includes second value -# print "num %d cur[num] %s" % (num, cur[num]) -# if cur[num] != "": -# idx = cur[num] -# print "idx='%s'" % idx -# #print_code() - - - - - #print "ARE WE SYNCED HERE?" - #print_code() - - # [Malik] end logic - start_level = find_cur_level(stmt, start_loop) # start_loop was passed parameter! - - # We should hold constant any block or tile loop - block_idxs = chill.block_indices() - thread_idxs = chill.thread_indices() - #print"\nblock indices are" - #for index, val in enumerate(block_idxs): - # print "%d\t%s" % ( int(index)+1 , val ) - #print"\nthread indices are" - #for index, val in enumerate(thread_idxs): - # print "%d\t%s" % ( int(index)+1 , val ) - #print "\nStart Level: %d" % start_level - - hold_constant = [] - #print("\n Now in Blocks") - for idx in block_idxs: - blocklevel = find_cur_level(stmt,idx) - if blocklevel >= start_level: - hold_constant.append(idx) - #print "\nJust inserted block %s in hold_constant" %idx - - #print("\n Now in Threads") - for idx in thread_idxs: - blocklevel = find_cur_level(stmt,idx) - if blocklevel >= start_level: - hold_constant.append(idx) - #print "\nJust inserted thread %s in hold_constant" %idx - #print "\nhold constant table is: " - #for index, val in enumerate(hold_constant): - # print "%d\t%s" % ( int(index)+1 , val ) - - #print("\nbefore datacopy pvt") - old_num_stmts = chill.num_statements() - #sys.stdout.flush() - - #print "\n[DataCopy]datacopy_privatized(%d, %s, %s, " % (stmt, start_loop, array_name), - #print hold_constant, - #print ")" - passtoC = [stmt, start_loop, array_name ] # a list - passtoC.append( len(hold_constant ) ) - for h in hold_constant: - passtoC.append( h ) - chill.datacopy_privatized( tuple( passtoC )) - sys.stdout.flush() - sys.stdout.flush() - - new_num_statements = chill.num_statements() - #print "new num statements %d" % new_num_statements - - # Unroll to the last thread level -# for stmt in range(old_num_statements, new_num_statements): -# print "unrolling statement %d" % stmt -# level = find_cur_level(stmt,thread_idxs[-1]) #get last thread level -# print "level is %d" % level -# idxs = chill.cur_indices(stmt) -# if level < len(idxs): -# chill.unroll(stmt,level+1,0) - - - -def copy_to_shared( start_loop, array_name, alignment ): - #print "\nstarting copy to shared( %s, %s, %d)" % (start_loop, array_name, alignment ) - #print "copy_to_shared( %s, %s, %d) in cudaize.py" % ( start_loop, array_name, alignment ) - stmt = 0 # assume statement 0 - - cur = chill.cur_indices(stmt) - #print "Cur indices ", - #print_array( cur ) - - start_level = find_cur_level( stmt, start_loop ) - #print "start_level %d" % start_level - - old_num_statements = chill.num_statements() - #print "old_num_statements %d" % old_num_statements - - - # Now, we give it indices for up to two dimensions for copy loop - copy_loop_idxs = ["tmp1","tmp2"] - #chill.datacopy_9arg(stmt, start_level, array_name, copy_loop_idxs, False, 0, 1, alignment,True) - passtoC = [stmt, start_level, array_name] # a list - passtoC.append( len(copy_loop_idxs)) - for i in copy_loop_idxs: - passtoC.append(i) - passtoC.append( 0 ) # False - passtoC.append( 0 ) - passtoC.append( 1 ) - passtoC.append( alignment ) - passtoC.append( 1 ) # True - #print "\n[DataCopy]datacopy( ", - #print passtoC, - #print ")" - - #if array_name == "b": - # chill.cheat(1) - #if array_name == "c": - # chill.cheat(2) - - chill.datacopy_9arg( tuple( passtoC )) - - #print "back from datacopy_9arg\n\n\n" - #sys.stdout.flush() - - - #print "calling add_sync( %d, %s )" % ( stmt, start_loop ) - chill.add_sync( stmt, start_loop ) - #print "back from add_sync()\n\n" - - new_num_statements = chill.num_statements() - - # This is fairly CUBLAS2 specific, not sure how well it generalizes, - # but for a 2D copy, what we want to do is "normalize" the first loop - # "tmp1" then get its hard upper bound. We then want to tile it to - # make the control loop of that tile "ty". We then tile "tmp2" with a - # size of 1 and make it "tx". - - #print "fairly CUBLAS2 specific, OLD %d NEW %d" % ( old_num_statements, new_num_statements) - sys.stdout.flush() - sys.stdout.flush() - - for stmt in range(old_num_statements, new_num_statements): - #print "for stmt = %d" % stmt - level = find_cur_level( stmt, "tmp2") - #print "FOUND CUR LEVEL? level '", - #print level, - #print "'" - - #print "in loop, stmt %d level %d" % ( stmt, level ) - if level != -1: - #print "\nCopy to shared: [If was no error]\n" - find_cur_level(stmt,"tmp2") - chill.tile3( stmt, level, level ) - - #print "hard_loop_bounds( %d, %d )" % (stmt, level) - bounds = chill.hard_loop_bounds(stmt, level) - lower = bounds[0] - upper = 1+ bounds[1] - #print "lower %d upper %d" % ( lower, upper ) - - dims = chill.thread_dims() - #print "in cudaize.py copy_to_shared, dims =", - #print dims - tx = dims[0] - ty = dims[1] - #print "2-loop cleanup: lower, upper: %d, %d, tx: %d" % ( lower, upper, tx) - - level = find_cur_level(stmt,"tmp1") - #print "level %d" % level - if tx == upper and ty == 1: - #print "tx = %d upper = %d ty = %d"% (tx, upper, ty) - #print "Don't need" - - # Don't need an extra tile level, just move this loop up - second_level = find_cur_level(stmt,"tmp2") - chill.tile7(stmt, second_level, 1, level, "tx", "tx", counted) - - else: - #print "DO need?" - if ty == 1: - new_ctrl = "tmp3" - else: - new_ctrl = "ty" - - # LOTS of commented out code here in cudaize.lua - - #print_code() - #print "\nStarting tmp2\n" - first_level = find_cur_level(stmt,"tmp1") - second_level = find_cur_level(stmt,"tmp2") - bounds = chill.hard_loop_bounds(stmt, second_level) - lower = bounds[0] - upper = 1 + bounds[1] # BROKEN? - - #print "[Malik]-loop cleanup@tmp2: lower, upper: %d, %d, tx: %d,first level:%d,second_level:%d" % ( lower, upper-1, tx, first_level, second_level) - - # Move the fastest changing dimension loop to the outermost,identified by "tmp2" and to be identified as tx. - #print "\n[fastest]tile(%d, %d, %d,%d,%s,%s,counted)"%(stmt, second_level,1,first_level, "tx", "tx") - chill.tile7(stmt, second_level,1,first_level,"tx","tx",counted) - #print_code() - - first_level = find_cur_level(stmt,"tmp1") - bounds = chill.hard_loop_bounds(stmt, first_level) - lower_1 = bounds[0] - upper_1 = 1 + bounds[1] - tx_level = find_cur_level(stmt,"tx") - bounds = chill.hard_loop_bounds(stmt,tx_level) - lower_tx = bounds[0] - upper_tx = 1+bounds[1] - #print "UL_1 %d %d UL_tx %d %d" % ( lower_1, upper_1-1, lower_tx, upper_tx-1) - - if int(math.ceil( float(upper_tx)/float(tx))) > 1: - #print "ceil I say" - #print "\n[Tile1]tile(%d, %d, %d,%d,%s,%s,counted)" % (stmt, tx_level,tx,tx_level, "tx", "tmp1") - chill.tile7(stmt,tx_level,tx,tx_level,"tx","tmp_tx",counted) - #print_code() - - repeat = find_cur_level(stmt,"tx") - #print "\n[Tile1]tile(%d, %d, %d)" % (stmt, repeat, repeat) - chill.tile3(stmt, repeat, repeat) #find_cur_level(stmt,"tx"),find_cur_level(stmt,"tx")) - #print_code() - - if find_cur_level(stmt,"tx")>find_cur_level(stmt,"tmp_tx"): - #print "\nagain [Tile1]tile(%d, %d, %d)" % (stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx")) - chill.tile3(stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx")) - #print_code() - - #print_code() - - #print "\nStarting tmp1\n" - # Handle the other slower changing dimension, the original outermost loop, now identified by "tmp1", to be identified as "ty". - chill.tile3(stmt,find_cur_level(stmt,"tmp1"),find_cur_level(stmt,"tmp1")) - #print_code() - - ty_level = find_cur_level(stmt,"tmp1") - bounds = chill.hard_loop_bounds(stmt,ty_level) - lower_ty = bounds[0] - upper_ty = 1 + bounds[1] - - tx_level = find_cur_level(stmt,"tx") - bounds = chill.hard_loop_bounds(stmt,tx_level) - lower_tx = bounds[0] - upper_tx = 1 + bounds[1] - - #print "[Malik]-loop cleanup@tmp1: lowerty, upperty: %d, %d, ty: %d,ty level:%d,tx_level:%d, stmt: %d" % ( lower_ty, upper_ty-1, ty, ty_level, tx_level, stmt) - - #print "before ceil" - #sys.stdout.flush() - - if(math.ceil(float(upper_ty)/float(ty)) > 1): - #print "CEIL IF" - #print "\n Inside upper_ty/ty > 1\n" - - #print "\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)"%(stmt, ty_level,ty,ty_level, "ty", "tmp_ty") - chill.tile7(stmt,ty_level,ty,ty_level,"ty","tmp_ty",counted) - #print_code() - - #print "\n[Tile2-1]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt ,"ty"),find_cur_level(stmt,"ty")) - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"ty")) - #print_code() - - cur_idxs = chill.cur_indices(stmt) - #print "\n cur indexes are ", - #print_array( cur_idxs) - #sys.stdout.flush() - - # Putting ty before any tmp_tx - idx_flag = -1 - if "tmp_tx" in cur_idxs: - idx_flag = 1 + cur_idxs.index("tmp_tx") # lua index starts at 1 - #print "\n (1) so i have found out the value of idx flag as %d" % idx_flag - #sys.stdout.flush() - - if idx_flag >= 0: - if find_cur_level(stmt,"ty") > find_cur_level(stmt,"tmp_ty"): - #print "\n[Tile2-2]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #print_code() - - - # Now Putting ty before any tmp_ty - sys.stdout.flush() - idx_flag = -1 - if "tmp_ty" in cur_idxs: - idx_flag = 1 + cur_idxs.index("tmp_ty") # lua index starts at 1 - #print "\n IF so i have found out the value of idx flag as %d" % idx_flag - #sys.stdout.flush() - - if idx_flag >= 0: - #print "one more test" - sys.stdout.flush() - if find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty"): - #print "\n[Tile2-2]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #sys.stdout.flush() - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #print_code() - - - - else: - #print "CEIL ELSE" - #print "\n[Tile3]tile(%d, %d, %d,%d,%s,%s,counted)" % (stmt, ty_level,1,ty_level, "ty", "ty") - #sys.stdout.flush() - chill.tile7( stmt, ty_level, 1, ty_level, "ty", "ty", counted ) - #print_code() - - #print "\n[Tile3-1]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1) - sys.stdout.flush() - - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1) - #print_code() - - - idx_flag = -1 - # LUA code checks to see if cur_idxs exists? it is unused except in the other clause of this is - #if(cur_idxs) then - #print "CAN NEVER GET HERE? cur_idxs" - #for num= 0,table.getn(cur_idxs) do - #if(cur[num] == "tmp_ty") then - #idx_flag = find_cur_level(stmt,cur[num]) - #break - #end - #end - print "\n ELSE so i have found out the value of idx flag as %d" % idx_flag - if idx_flag >= 0: # can't happen - print "tile( stmt %d, level ty %d, level ty %d" % ( stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - - - - - - #print "\n\n *** at bottom of if in copy to shared, " - #print_code() - #print "end of if" - - else: - # copy to shared only created one level, not two, so we use a different approach (MV & TMV) - #print "\nCopy to shared: [If was error]\n" - level = find_cur_level(stmt,"tmp1") - chill.tile3(stmt, level, level) - - dims = chill.thread_dims() - #print dims - tx = dims[0] - ty = dims[1] - - bounds = chill.hard_loop_bounds(stmt, level) - lower = bounds[0] - upper = bounds[1] - - #print "bounds lower %d upper %d" % (lower, upper) - upper = upper+1 # upper bound given as <=, compare to dimensions tx which is < - if upper == tx: - #print "upper == tx" - chill.rename_index( stmt, "tmp1", "tx") - else: - #print "upper is not tx" - #print "upper %d tx %d stmt: %d level: %d" % ( upper, tx, stmt, level) - chill.tile7( stmt, level, tx, level, "tx", "tmp_tx", counted) - #print_code() - - #print "stmt:%d level+1: %d" % ( stmt, level+1) - #print("TILE 7") - chill.tile7( stmt, level+1,1,level+1,"tx", "tx",counted) - #print("TILE 3") - chill.tile3( stmt, level+1, level) - #print_code() - - - if ty > 1: - #print "GOING IN" - bounds = chill.hard_loop_bounds(stmt, level+1) - lower = bounds[0] - upper = bounds[1] - #print "ty %d lower %d upper %d" % ( ty, lower, upper ) - floatdiv = float(upper)/float(ty) - bound = int(math.ceil(float(upper)/float(ty))) - #print "NOW FOR Y: upper %d ty %d stmt: %d level: %d bound: %d" % ( upper, ty, stmt, level+1, bound) - chill.tile7(stmt, level+1, bound, level+1, "tmp_ty", "ty", counted) - - # Always add sync - chill.add_sync( stmt, start_loop ) - #print "ending copy to shared\n" - #sys.stdout.flush() - #print_code() - - - - - - - - - - - - - - - - - - - -def unroll_to_depth( max_depth ): - print "\n\nunroll_to_depth(%d)" % max_depth - print "SYNC UP" - sys.stdout.flush() - - cur = chill.cur_indices(0) - thread_idxs = chill.thread_indices() - guard_idx = thread_idxs[-1] # last one - - print "cur indices", - print_array(cur) - print "thread indices", - print_array(thread_idxs) - print "guard_idx = %s" % guard_idx - - #print "thread_idxs = ", - #print thread_idxs - guard_idx = thread_idxs[-1] - #print "guard_idx = %s" % guard_idx - - # HERE FIND OUT THE LOOPS WHICH ARE COMMON BETWEEN STATEMENTS - common_loops = [] - comm_loops_cnt = 0 - num_stmts = chill.num_statements() - print "num statements %d" % num_stmts - - for stmt in range(num_stmts): - sys.stdout.flush() - print "\nSTMT %d" % stmt, - cur_idxs = chill.cur_indices(stmt) - print "Current Indices:", - for c in cur_idxs[:-1]: - print "%s," % c, - print "%s" % cur_idxs[-1] # last one - sys.stdout.flush() - #print_code() - - if chk_cur_level(stmt, "tx") > 0: - - for ii in range(find_cur_level(stmt,"tx")-1): - print "ii = %d\ncur_idxs[%d] = '%s'" % (ii+1, ii+1, cur_idxs[ii]) # print to match lua - id = cur_idxs[ii] - if id not in ["bx", "by", "", "tx", "ty"]: - - print "id %s is not in the list" % id - - for stmt1 in range(stmt+1, num_stmts): - print "\nii %d stmt1 is %d" % (ii+1, stmt1) # print to match lua - cur_idxs1 = chill.cur_indices(stmt1) - print "\nstmt1 cur_idxs1 is ", - for ind in cur_idxs1[:-1]: - print "%s," % ind, - print "%s" % cur_idxs1[-1] - - print "cur level(%d, %s) = %d" % (stmt, "tx", find_cur_level(stmt,"tx") ) - sys.stdout.flush() - - endrange = find_cur_level(stmt,"tx")-1 - print "for iii=1, %d do" % endrange - sys.stdout.flush() - for iii in range(endrange): # off by one? TODO - print "stmt %d ii %d iii %d\n" % (stmt, ii+1, iii+1), - sys.stdout.flush() - - if iii >= len(cur_idxs1): - print "stmt %d ii %d iii %d cur_idxs1[%d] = NIL" % (stmt, ii+1, iii+1, iii+1, ) # print to match lua - else: - print "stmt %d ii %d iii %d cur_idxs1[%d] = '%s'" % (stmt, ii+1, iii+1, iii+1, cur_idxs1[iii]) # print to match lua - sys.stdout.flush() - - # this will still probably die - if iii < len(cur_idxs1) and [iii] not in ["bx", "by", "tx", "ty", ""]: - if cur_idxs[ii] == cur_idxs1[iii]: - print "\nfound idx:%s" % cur_idxs[ii] - common_loops.append(cur_idxs[ii]) - print "cl[%d] = '%s'" % ( comm_loops_cnt, cur_idxs[ii] ) - comm_loops_cnt = len(common_loops) - - if len(common_loops) > 0: - print "\n COMM LOOPS :TOTAL %d, and are " % comm_loops_cnt, - print common_loops, - print " this loop : %s" % common_loops[0] - else: - print "UNROLL can't unroll any loops?" - - - while True: # break at bottom of loop (repeat in lua) - old_num_statements = chill.num_statements() - print "old_num_statements %d" % old_num_statements - - for stmt in range(old_num_statements): - cur_idxs = chill.cur_indices(stmt) - print "stmt %d cur_idxs =" % stmt, - index = 0 - for i in cur_idxs: - index +=1 - if index == len(cur_idxs): - print "%s" %i - else: - print "%s," % i, - - if len(cur_idxs) > 0: - guard_level = -1 - if chk_cur_level(stmt, guard_idx) > 0: - guard_level = find_cur_level(stmt,guard_idx) - print "guard_level(sp) = %d" % guard_level - if guard_level > -1: - level = next_clean_level(cur_idxs,guard_level) - print "next clean level %d" % level - - - #print "looking at %d" % stmt - #print "comparing %d and %d in" % (guard_level, level), - #index = 0 - #for i in cur_idxs: - #index +=1 - #if index == len(cur_idxs): - # print "%s" %i - #else: - # print "%s," % i, - - # need to handle max_depth - num_unrolled = 0 - level_unroll_comm = level - level_arr = [] - - #print "before while, level = %d" % level - while level >= 0: - print "while: level = %d" % level - if num_unrolled == max_depth: - break - - print "Unrolling %d at level %d index %s" % ( stmt, level, cur_idxs[guard_level]) # ??? - level_arr.append(level) - - guard_level = find_cur_level(stmt,guard_idx) - level = next_clean_level(cur_idxs,level+1) - - print "OK, NOW WE UNROLL" - if level_unroll_comm >= 0: - level_arr.reverse() - for i,lev in enumerate(level_arr): - print "\ni=%d" % i - print "[Unroll]unroll(%d, %d, 0)" % (stmt, lev) - chill.unroll(stmt, lev, 0) - - - new_num_statements = chill.num_statements() - if old_num_statements == new_num_statements: - break # exit infinite loop - - -# all other calls to C have a routine in this file (?) -def unroll( statement, level, unroll_amount ): - chill.unroll( statement, level, unroll_amount ) - diff --git a/examples/cuda-chill/mm.c b/examples/cuda-chill/mm.c deleted file mode 100644 index 0efbeeb..0000000 --- a/examples/cuda-chill/mm.c +++ /dev/null @@ -1,10 +0,0 @@ -#define N 1024 - -void normalMM(float c[N][N], float a[N][N], float b[N][N]) { - int i, j, k; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - for (k = 0; k < N; k++) - c[j][i] = c[j][i] + a[k][i] * b[j][k]; -} diff --git a/examples/cuda-chill/mm.lua b/examples/cuda-chill/mm.lua deleted file mode 100644 index 5bde1b0..0000000 --- a/examples/cuda-chill/mm.lua +++ /dev/null @@ -1,38 +0,0 @@ -init("mm.c", "normalMM", 0) -dofile("cudaize.lua") -N=1024 -Ti=128 -Tj=64 -Tk=16 -Tii=16 -Tjj=16 - - - - -N=1024 - - - - - - - - - - - - - -tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j","k"})CU=1 - -tile_by_index({"k"},{Tk},{l1_control="kk"},{"ii","jj","kk","i","j","k"})CU=3 - -tile_by_index({"i","j"},{Tii,Tjj},{l1_control="iii",l2_control="jjj"},{"ii","jj","kk","i","iii","j","jjj","k"},1)CU=2 - -cudaize("mm_GPU",{a=1048576,b=1048576,c=1048576},{block={"ii","jj"}, thread={"i","j"}})CU=2 -copy_to_shared("tx","a",-16) -copy_to_shared("tx","b",-16) -copy_to_registers("kk","c") ---print_code() -unroll_to_depth(2) diff --git a/examples/cuda-chill/mpeg4.c b/examples/cuda-chill/mpeg4.c deleted file mode 100755 index 7f83bf7..0000000 --- a/examples/cuda-chill/mpeg4.c +++ /dev/null @@ -1,23 +0,0 @@ -#define N1 4096 -#define N2 4096 -#define WINDOW_SIZE 16 - -void mpeg4_cpu(float result[N1][N2], float prev[N2+WINDOW_SIZE][N2+WINDOW_SIZE], float curr[WINDOW_SIZE*WINDOW_SIZE]) -{ - unsigned int i; - unsigned int j; - unsigned int k; - unsigned int l; - - for ( i = 0; i < N1; ++i) - for ( j = 0; j < N2; ++j) - for ( k = 0; k < WINDOW_SIZE; ++k) - for ( l = 0; l < WINDOW_SIZE; ++l) - result[i][j] += prev[i+k][j+l] * curr[k*WINDOW_SIZE+l]; - - - - - -} - diff --git a/examples/cuda-chill/mpeg4.lua b/examples/cuda-chill/mpeg4.lua deleted file mode 100644 index f025dc0..0000000 --- a/examples/cuda-chill/mpeg4.lua +++ /dev/null @@ -1,45 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("mpeg4.c", "mpeg4_cpu", 0) - ---dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers,copy_to_shared methods -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers,copy_to_shared methods - -N=4096 -M=4096 -W=16 - ---TI 4ust be <= M ---TJ must be <=TI -Ti=32 -Tj=32 -Tii=16 -Tjj=16 -Tk=4 ---permute(0,{"j","i","k","l"}) -tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j","k","l"}) ---tile_by_index({"k","l"},{Tk*2,Tk*2},{l1_control="kk",l2_control="ll"},{"ii","jj","kk","ll","i","j","k","l"}) ---print_code() ---tile_by_index({"k","l"},{Tk,Tk},{l1_control="kk",l2_control="ll"},{"ii","jj","i","j","kk","k","ll","l"}) -tile_by_index({"i","j"},{Tii,Tjj},{l1_control="iii",l2_control="jjj"},{"ii","jj","iii","i","jjj","j","k","l"}) ---print_code() ---normalize_index("j") ---normalize_index("i") ---print_code() -cudaize("kernel_GPU",{curr=W*W,prev=(N+W)*(M+W),result=N*M},{block={"ii","jj"}, thread={"i","j"}}) ---print_code() -copy_to_shared("iii","prev",16) - -copy_to_registers("jjj","result") - ---print_code() ---copy_to_constant_no_tile("curr") -unroll_to_depth(2) -print_code() -print_space() - - diff --git a/examples/cuda-chill/mriq-fh.c b/examples/cuda-chill/mriq-fh.c deleted file mode 100755 index 1e924b7..0000000 --- a/examples/cuda-chill/mriq-fh.c +++ /dev/null @@ -1,38 +0,0 @@ -#define X 32768 -#define K 256 -struct kValues { - float Kx; - float Ky; - float Kz; - float PhiMag; -}; -extern float sin(float); -extern float cos(float); - -void mriFH_cpu(float *rPhi,float *rRho,float *iRho, float *iPhi, float *rD, float *iD, float *kx, float *ky, float *kz, float *dx, float *dy, float *dz, float *rFHref, float *iFHref) -{ - - float rfh; - float ifh; - float exp; - float cArg; - float sArg; - //float rRho[K]; - //float iRho[K]; - unsigned int k; - unsigned int x; - - - for (x = 0; x < X; ++x) { - for (k = 0; k < K; ++k) { - - exp = 2 * 3.14159 * (kx[k]* dx[x] + ky[k]* dy[x] + kz[k]* dz[x]); - cArg = cos(exp); - sArg = sin(exp); - rFHref[x] += rRho[k]* cArg - iRho[k]* sArg; - iFHref[x] += iRho[k]*cArg + rRho[k]*sArg; - } - - } -} - diff --git a/examples/cuda-chill/mriq-fh.lua b/examples/cuda-chill/mriq-fh.lua deleted file mode 100755 index 3277bac..0000000 --- a/examples/cuda-chill/mriq-fh.lua +++ /dev/null @@ -1,73 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("mriq-fh.c", "mriFH_cpu", 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -N=32768 -M=256 -Tx=256 - - -print_code() ---permute(0,{"j","i"}) ---tile_by_index({"j","i"}, {TI,TJ}, {l1_control="jj", l2_control="ii"}, {"jj","ii", "j", "i"}) -tile_by_index({"x"},{Tx},{l1_control="xx"},{"xx","x","k"}) ---tile_by_index({"x"},{16},{l1_control="xx1"},{"xx","x","xx1","k"}) ---tile_by_index({"j"}, {TI}, {l1_control="jj"}, {"ii","jj", "j", "i"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) -print_code() - -normalize_index("x") ---normalize_index("i") -print_code() ---tile_by_index({"i"}, {TI}, {l1_control="iii",l1_tile="i"}, {"ii","jj", "iii","j","i"}) ---print_code() ---cudaize("Kernel_GPU", {x=N,y=N,z=N,Qr=N,Qi=N,kVals=M},{block={"jj"}, thread={"j"}}) -cudaize("kernel_GPU",{dx=N,dy=N,dz=N,iRho=M,kx=M,ky=M,kz=M,rFHref=N,iFHref=N,rRho=M},{block={"xx"}, thread={"x"}}) ---copy_to_shared("tx","iRho",-16) ---copy_to_shared("tx","dz",1) ---copy_to_shared("tx","rRho",-16) ---copy_to_registers("tx","rFHref") ---copy_to_registers("tx","rRho") ---copy_to_registers("tx","iRho") ---copy_to_registers("tx","kx") ---copy_to_registers("tx","dx") ---copy_to_registers("tx","ky") ---copy_to_registers("tx","dy") ---copy_to_registers("tx","kz") ---copy_to_registers("tx","dz") ---copy_to_registers("tx","iFHref") ---copy_to_texture("rRho") ---copy_to_texture("kx") ---copy_to_texture("dx") ---copy_to_texture("ky") ---copy_to_texture("dy") ---copy_to_texture("kz") ---copy_to_texture("dz") ---copy_to_texture("iRho") ---print_code()--]] ---unroll(0,4,0) ---copy_to_constant_no_tile("kx") ---copy_to_constant_no_tile("ky") ---copy_to_constant_no_tile("kz") ---copy_to_constant_no_tile("rRho") ---copy_to_constant_no_tile("iRho") - ---unroll_to_depth(1) -print_code() ---[[ -copy_to_Texture("rRho") -copy_to_Texture("kx") -copy_to_Texture("dx") -copy_to_Texture("ky") -copy_to_Texture("dy") -copy_to_Texture("kz") -copy_to_Texture("dz") -copy_to_Texture("iRho") ---unroll_to_depth(2) ---]] diff --git a/examples/cuda-chill/mriq.c b/examples/cuda-chill/mriq.c deleted file mode 100644 index ba4b87c..0000000 --- a/examples/cuda-chill/mriq.c +++ /dev/null @@ -1,33 +0,0 @@ -#define N 32768 -#define M 3072 -struct kValues { - float Kx; - float Ky; - float Kz; - float PhiMag; -}; -extern float sinf(float); -extern float cosf(float); - -void -ComputeQCPU(int numK, int numX,struct kValues kVals[M],float x[N], float y[N], float z[N],float Qr[N], float Qi[N]) { - float expArg; - float cosArg; - float sinArg; - float phi; - int i; - int j; - numK = M; - numX = N; - for ( i = 0; i < M; i++) { - for ( j = 0; j < N; j++) { - expArg = 6.2831853071795864769252867665590058f * (kVals[i].Kx * x[j] +kVals[i].Ky * y[j] +kVals[i].Kz * z[j]); - cosArg = cosf(expArg); - sinArg = sinf(expArg); - phi = kVals[i].PhiMag; - Qr[j] += phi * cosArg; - Qi[j] += phi * sinArg; - } - } -} - diff --git a/examples/cuda-chill/mriq.lua b/examples/cuda-chill/mriq.lua deleted file mode 100644 index 1170111..0000000 --- a/examples/cuda-chill/mriq.lua +++ /dev/null @@ -1,55 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("mriq.c", "ComputeQCPU", 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -N=32768 -M=3072 -TI=128 -TJ=128 - -permute(0,{"j","i"}) ---tile_by_index({"j","i"}, {TI,TJ}, {l1_control="jj", l2_control="ii"}, {"jj","ii", "j", "i"}) -tile_by_index({"i"}, {TJ}, {l1_control="ii",l1_tile="i"}, {"ii", "j","i"}) -tile_by_index({"j"}, {TI}, {l1_control="jj"}, {"ii","jj", "j", "i"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() - -normalize_index("j") -normalize_index("i") ---print_code() ---tile_by_index({"i"}, {TI}, {l1_control="iii",l1_tile="i"}, {"ii","jj", "iii","j","i"}) ---print_code() -cudaize("Kernel_GPU", {x=N,y=N,z=N,Qr=N,Qi=N,kVals=M},{block={"jj"}, thread={"j"}}) - -copy_to_shared("tx","kVals",1) ---copy_to_shared("tx","x",1) ---copy_to_shared("tx","y",1) ---copy_to_shared("tx","z",1) - ---copy_to_texture("kVals") ---datacopy(0, 3, "kVals", {"tt","t"},false,0,1,-16,true) ---print_code() ---datacopy_privatized(0,"tx","kVals",{"tx"}) ---copy_to_registers("tx","kVals") -copy_to_registers("ii","x") -copy_to_registers("ii","y") -copy_to_registers("ii","z") -copy_to_registers("ii","Qi") -copy_to_registers("ii","Qr") ---[[datacopy_privatized(0,"tx","x",{"tx"}) -datacopy_privatized(0,"tx","y",{"tx"}) -datacopy_privatized(0,"tx","z",{"tx"}) -datacopy_privatized(0,"tx","Qi",{"tx"}) -datacopy_privatized(0,"tx","Qr",{"tx"}) - - -]]-- ---unroll(0,5,64) -print_code() ---unroll_to_depth(1) --won't unroll past thread/loop mapping, unrolls up to two loop levels diff --git a/examples/cuda-chill/mv-shadow.c b/examples/cuda-chill/mv-shadow.c deleted file mode 100644 index 582b187..0000000 --- a/examples/cuda-chill/mv-shadow.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[j][i] * b[j]; -} diff --git a/examples/cuda-chill/mv-shadow.lua b/examples/cuda-chill/mv-shadow.lua deleted file mode 100644 index 43e8491..0000000 --- a/examples/cuda-chill/mv-shadow.lua +++ /dev/null @@ -1,65 +0,0 @@ -init("mv-shadow.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=129 -TI=32 -TJ=64 - -N=1024 -TI=16 - - - - - - - - - - - - - - - - ---Tile the i and j loop, introducing "ii" as the control loop for the "i" ---tile, "k" for the control loop fo the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TJ}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) ---tile_by_index({"j"}, {TI}, {l2_control="k"}, { "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("ii") -normalize_index("i") -print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("mv_GPU", {a=N, b=N, c=N*N}, {block={"ii"}, thread={"i"}}) ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy - ---copy_to_shared("tx", "b", 1) ---copy_to_shared("tx", "c", -16) ---print_code() ---copy_to_texture("b") ---copy_to_texture("c") -copy_to_registers("k", "a") ---print_code() - -unroll_to_depth(1) --won't unroll past thread/loop mapping, unrolls up to two loop levels ---copy_to_texture("b") ---print_code() ---unroll(0,5,0) ---print_code() diff --git a/examples/cuda-chill/mv.c b/examples/cuda-chill/mv.c deleted file mode 100644 index 582b187..0000000 --- a/examples/cuda-chill/mv.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[j][i] * b[j]; -} diff --git a/examples/cuda-chill/mv.lua b/examples/cuda-chill/mv.lua deleted file mode 100644 index ca54501..0000000 --- a/examples/cuda-chill/mv.lua +++ /dev/null @@ -1,65 +0,0 @@ -init("mv.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=129 -TI=32 -TJ=64 - -N=1024 - - - - - - - - - - - - - - - - ---Tile the i and j loop, introducing "ii" as the control loop for the "i" ---tile, "k" for the control loop fo the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TJ}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) ---tile_by_index({"j"}, {TI}, {l2_control="k"}, { "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("ii") -normalize_index("i") -print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("mv_GPU", {a=N, b=N, c=N*N}, {block={"ii"}, thread={"i"}}) - ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy - ---copy_to_shared("tx", "b", 1) ---copy_to_shared("tx", "c", -16) ---print_code() ---copy_to_texture("b") ---copy_to_texture("c") -copy_to_registers("k", "a") ---print_code() - -unroll_to_depth(1) --won't unroll past thread/loop mapping, unrolls up to two loop levels ---copy_to_texture("b") ---print_code() ---unroll(0,5,0) ---print_code() diff --git a/examples/cuda-chill/mv_try.c b/examples/cuda-chill/mv_try.c deleted file mode 100644 index 7781f3b..0000000 --- a/examples/cuda-chill/mv_try.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 4096 - -void normalMV(int n, float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - a[i] = a[i] + c[i][j] * b[j]; -} diff --git a/examples/cuda-chill/mv_try.lua b/examples/cuda-chill/mv_try.lua deleted file mode 100644 index db4d9ad..0000000 --- a/examples/cuda-chill/mv_try.lua +++ /dev/null @@ -1,14 +0,0 @@ -init("mv_try.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -TI=96 - -N=4096 - - -tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) -cudaize("mv_GPU", {a=N, b=N, c=N*N}, - {block={"ii"}, thread={"i"}}) - -print_code() diff --git a/examples/cuda-chill/nbody.c b/examples/cuda-chill/nbody.c deleted file mode 100644 index 57899b6..0000000 --- a/examples/cuda-chill/nbody.c +++ /dev/null @@ -1,66 +0,0 @@ -#define NBODIES 16384 -#define SOFTENINGSQUARED 0.01f -#define DELTATIME 0.001f -#define DAMPING 1.0f - -#define NBLOCKSY 1 -#define NBLOCKSX (NBODIES/NTHREADSX) -#define NTHREADSY 1 -#define NTHREADSX 64 - -#define BLOCKSIZE 128 - -#define SHARED 1 -#define TIMER 1 -#define VERIFY 1 - -extern float sqrtf(float); - -void nbody_cpu(float* oldpos,float* oldpos1, float *newpos, float *oldvel, float *newvel, float *force) -{ - float r0,r1,r2; - float invDist, invDistCube, mass, invMass; - unsigned int i,j; - for(i = 0; i < NBODIES; ++i) { - //force[i*4 ] = 0; - //force[i*4+1] = 0; - //force[i*4+2] = 0; - //force[i*4+3] = 0; - for(j = 0; j < NBODIES; ++j) { - r0 = oldpos[j*4]-oldpos1[i*4]; - r1 = oldpos[j*4+1]-oldpos1[i*4+1]; - r2 = oldpos[j*4+2]-oldpos1[i*4+2]; - - invDist = 1.0/sqrtf(r0 * r0 + r1 * r1 + r2 * r2 + SOFTENINGSQUARED); - invDistCube = invDist * invDist * invDist; - mass = oldpos1[i*4+3]; - - force[i*4] = force[i*4] + r0 * mass * invDistCube; - force[i*4+1] = force[i*4+1] + r1 * mass * invDistCube; - force[i*4+2] = force[i*4+2] + r2 * mass * invDistCube; - - } - } - -/* for (i = 0; i < NBODIES; ++i) { - invMass = oldvel[4*i+3]; - - oldvel[4*i] += (force[4*i] * invMass) * DELTATIME * DAMPING; - oldvel[4*i+1] += (force[4*i+1] * invMass) * DELTATIME * DAMPING; - oldvel[4*i+2] += (force[4*i+2] * invMass) * DELTATIME * DAMPING; - - oldpos[4*i] += oldvel[4*i] * DELTATIME; - oldpos[4*i+1] += oldvel[4*i+1] * DELTATIME; - oldpos[4*i+2] += oldvel[4*i+2] * DELTATIME; - - newpos[4*i+0] = oldpos[4*i]; - newpos[4*i+1] = oldpos[4*i+1]; - newpos[4*i+2] = oldpos[4*i+2]; - newpos[4*i+3] = oldpos[4*i+3]; - - newvel[4*i+0] = oldvel[4*i]; - newvel[4*i+1] = oldvel[4*i+1]; - newvel[4*i+2] = oldvel[4*i+2]; - newvel[4*i+3] = oldvel[4*i+3]; - }*/ -} diff --git a/examples/cuda-chill/nbody.lua b/examples/cuda-chill/nbody.lua deleted file mode 100644 index 08f88a9..0000000 --- a/examples/cuda-chill/nbody.lua +++ /dev/null @@ -1,53 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("nbody.c", "nbody_cpu" , 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -NBODIES=16384 - - ---Tj=128 CHANGE FOR BEST..... BEST IS 64BLOCKS 128THREADS ---Ti=256 -Tj=64 -Ti=32 -Tjjj=1 -Tiii=1 -Tn=0.1 ---normalize_index("j") --- ---print_code() ---normalize_index("n") --- TILE COMMANDS ZEROOOOOOOOOOO:3 ---tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j"})--CU=-1 -tile_by_index({"i"},{Ti},{l1_control="ii"},{"ii","i","j"})--CU=-1 ---normalize_index("i") ---tile_by_index({"n"},{Tn},{l1_control="nn"},{"jj","ii","nn","j","i","n"})--CU=-1 - ---tile_by_index({"j","i"},{Tjjj,Tiii},{l1_control="jjj",l2_control="iii"},{"jj","ii","nn","jjj","j","iii","i","n"})--CU=3 ---tile_by_index({"j"}, {Tn}, {l1_control="j",l1_tile="jjj"}, {"ii", "jj", "nn","jjj","j","i","n"}) ---tile_by_index({"i"}, {Ti/2}, {l1_control="iii"}, {"ii","iii", "jj","i","j"}) ---print_code() -cudaize("kernel_GPU",{oldpos=4*NBODIES,oldpos1=4*NBODIES,oldvel=4*NBODIES,force=4*NBODIES,newpos=4*NBODIES,newvel=4*NBODIES},{block={"ii"}, thread={"i"}})--CU=3 -print_code() ---tile(0,6,6) ---copy_to_shared("tx","oldpos",-16) ---copy_to_registers("j","oldpos") ---copy_to_registers("j","oldpos1") ---copy_to_registers("j","force") - ---copy_to_texture("oldpos") ---tile(1,3,3) ---tile(2,3,3) - -print_code() ---unroll_to_depth(1) --- ---tile(2,3,3) ---unroll(2,3,0) ---unroll(0,5,0) ---print_code() diff --git a/examples/cuda-chill/tmv-shadow.c b/examples/cuda-chill/tmv-shadow.c deleted file mode 100644 index cb9ea8d..0000000 --- a/examples/cuda-chill/tmv-shadow.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[i][j] * b[j]; -} diff --git a/examples/cuda-chill/tmv-shadow.lua b/examples/cuda-chill/tmv-shadow.lua deleted file mode 100644 index 196b939..0000000 --- a/examples/cuda-chill/tmv-shadow.lua +++ /dev/null @@ -1,50 +0,0 @@ -init("tmv-shadow.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=1024 ---N= 8209 ---N=129 -TI=64 -N=1024 -TI=32 ---tile, "k" for the control loop for the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TI}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---tile_by_index({"i"}, {TI/32}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) - ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("i") ---print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("tmv_GPU", {a=N, b=N, c=N*N},{block={"ii"}, thread={"i"}}) - ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy -copy_to_shared("tx", "b", 1) ---copy_to_texture("b") ---print_code() - -copy_to_shared("tx", "c", -16) ---copy_to_texture("c") ---print_code() - -copy_to_registers("k", "a") -print_code() ---unroll(0,5,0) ---unroll(0,4,0) ---unroll(2,4,16) -unroll_to_depth(1) ---print_code() diff --git a/examples/cuda-chill/tmv.c b/examples/cuda-chill/tmv.c deleted file mode 100644 index cb9ea8d..0000000 --- a/examples/cuda-chill/tmv.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[i][j] * b[j]; -} diff --git a/examples/cuda-chill/tmv.lua b/examples/cuda-chill/tmv.lua deleted file mode 100644 index 5071108..0000000 --- a/examples/cuda-chill/tmv.lua +++ /dev/null @@ -1,50 +0,0 @@ -init("tmv.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=1024 ---N= 8209 ---N=129 -TI=64 -N=1024 -TI=32 ---tile, "k" for the control loop for the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TI}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---tile_by_index({"i"}, {TI/32}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) - ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("i") ---print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("tmv_GPU", {a=N, b=N, c=N*N},{block={"ii"}, thread={"i"}}) - ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy -copy_to_shared("tx", "b", 1) ---copy_to_texture("b") ---print_code() - -copy_to_shared("tx", "c", -16) ---copy_to_texture("c") ---print_code() - -copy_to_registers("k", "a") -print_code() ---unroll(0,5,0) ---unroll(0,4,0) ---unroll(2,4,16) -unroll_to_depth(1) ---print_code() diff --git a/examples/fortran/README b/examples/fortran/README deleted file mode 100644 index 4f23bee..0000000 --- a/examples/fortran/README +++ /dev/null @@ -1,10 +0,0 @@ -// Manu - -1) Fortran support added to permute, tile, unroll and datacopy. Tested these w.r.t gemm.c using gemm.script. - There might be other issues (like fusion due to unroll, ...) that have not been tested. - -2) To incorporate Fortran support I had to modify certain values in omega (include/omega/omega_core/oc.h). - To solve for large number of unknowns, these values have to be reverted back. - -3) Tested the existing chill scripts using Derick's python script. - At least the existing chill scripts are not affected by the fortran related changes. diff --git a/examples/fortran/ccd.f b/examples/fortran/ccd.f deleted file mode 100644 index 12d834d..0000000 --- a/examples/fortran/ccd.f +++ /dev/null @@ -1,32 +0,0 @@ -c -c These have been separated out from ccsd_t_singles_l.F and ccsd_t_doubles_l.F -c - subroutine clean_sd_t_s1_1(h3d,h2d,h1d,p6d,p5d,p4d, - 2 triplesx,t1sub,v2sub) - IMPLICIT NONE - integer h3d,h2d,h1d,p6d,p5d,p4d - integer h3,h2,h1,p6,p5,p4 - integer N - double precision triplesx(16,16,16,16,16,16) - double precision t1sub(16,16) - double precision v2sub(16,16,16,16) - - N = 16 - - do p4=1,10 - do p5=1,10 - do p6=1,10 - do h1=1,10 - do h2=1,10 - do h3=1,10 - triplesx(h3,h2,h1,p6,p5,p4)=triplesx(h3,h2,h1,p6,p5,p4) - 1 + t1sub(p4,h1)*v2sub(h3,h2,p6,p5) - enddo - enddo - enddo - enddo - enddo - enddo - return - end - diff --git a/examples/fortran/ccd.script b/examples/fortran/ccd.script deleted file mode 100644 index c2af500..0000000 --- a/examples/fortran/ccd.script +++ /dev/null @@ -1,18 +0,0 @@ -source: ccd.f -procedure: clean_sd_t_s1_1 -format : rose -loop: 0 - - - -original() - -UN=4 - -unroll(0,5,4) -unroll(0,4,4) -unroll(0,3,4) -unroll(0,2,4) -unroll(0,1,4) - -print diff --git a/examples/fortran/gemm.f90 b/examples/fortran/gemm.f90 deleted file mode 100644 index b65bb58..0000000 --- a/examples/fortran/gemm.f90 +++ /dev/null @@ -1,58 +0,0 @@ -program matmul - - integer N,i,j,k - real*8 a(10,10), b(10,10), c(10,10), ct(10,10),mysum - - do i=1,10,1 - do j=1,10,1 - a(i,j) = i+j - b(i,j) = i-j - c(i,j) = 0.0 - ct(i,j) = 0.0 - end do - b(i,i) = 1.0; - end do - - - DO j=1,10,1 - DO k=1,10,1 - DO i=1,10,1 - c(i,j) = c(i,j)+a(i,k)*b(k,j) - end do - end do - end do - - - - call gemm(10,a,b,ct) - - mysum = 0.0 - do i=1,10,1 - do j=1,10,1 - mysum = c(i,j) - ct(i,j) - end do - end do - - if (abs(mysum) >= 0.00001) then - write (*,*) "Something wrong" - else - write (*,*) "Output matches" - end if - -end program matmul - - SUBROUTINE gemm(N,A,B,C) - INTEGER N - REAL*8 A(N,N), B(N,N), C(N,N) - - INTEGER I,J,K - - DO J=1,N,1 - DO K=1,N,1 - DO I=1,N,1 - C(I,J) = C(I,J)+A(I,K)*B(K,J) - end do - end do - end do - - END subroutine diff --git a/examples/fortran/gemm.script b/examples/fortran/gemm.script deleted file mode 100644 index 01eb859..0000000 --- a/examples/fortran/gemm.script +++ /dev/null @@ -1,30 +0,0 @@ -#matrix multiply large array size for intel machine -source: gemm.f90 -procedure: gemm -format: rose -loop: 0 - -TI = 128 -#TI = 4 -TJ = 8 -#TK = 3 -TK = 512 -UI = 2 -UJ = 2 - -permute([3,1,2]) -tile(0,2,TJ) -#print space -tile(0,2,TI) -#print space -tile(0,5,TK) -#print space - - -datacopy(0,3,A,false,-1) -#print space - -datacopy(0,4,B) -unroll(0,4,UI) -unroll(0,5,UJ) - diff --git a/examples/fortran/rose_gemm.f90 b/examples/fortran/rose_gemm.f90 deleted file mode 100644 index d150922..0000000 --- a/examples/fortran/rose_gemm.f90 +++ /dev/null @@ -1,155 +0,0 @@ -PROGRAM matmul -INTEGER :: N, i, j, k -REAL(kind=8) :: a(10,10), b(10,10), c(10,10), ct(10,10), mysum -DO i = 1, 10, 1 -DO j = 1, 10, 1 -a(i,j) = i + j -b(i,j) = i - j -c(i,j) = 0.0 -ct(i,j) = 0.0 -END DO -b(i,i) = 1.0 -END DO -DO j = 1, 10, 1 -DO k = 1, 10, 1 -DO i = 1, 10, 1 -c(i,j) = c(i,j) + a(i,k) * b(k,j) -END DO -END DO -END DO -CALL gemm(10,a,b,ct) -mysum = 0.0 -DO i = 1, 10, 1 -DO j = 1, 10, 1 -mysum = c(i,j) - ct(i,j) -END DO -END DO -IF (abs(mysum) >= 0.00001) THEN -WRITE (*, FMT=*) "Something wrong" -ELSE -WRITE (*, FMT=*) "Output matches" -END IF -END PROGRAM matmul - -SUBROUTINE gemm(N,A,B,C) -INTEGER :: t12 -INTEGER :: t10 -INTEGER :: t8 -INTEGER :: t6 -INTEGER :: t4 -INTEGER :: t2 -INTEGER :: chill_t64 -INTEGER :: chill_t63 -INTEGER :: chill_t62 -INTEGER :: chill_t61 -INTEGER :: chill_t60 -INTEGER :: chill_t59 -INTEGER :: chill_t58 -INTEGER :: chill_t57 -INTEGER :: chill_t56 -INTEGER :: chill_t55 -INTEGER :: chill_t54 -INTEGER :: chill_t53 -INTEGER :: chill_t52 -INTEGER :: chill_t51 -INTEGER :: chill_t50 -INTEGER :: chill_t49 -INTEGER :: chill_t48 -INTEGER :: chill_t47 -INTEGER :: over2 -INTEGER :: chill_t46 -INTEGER :: chill_t45 -INTEGER :: chill_t44 -INTEGER :: chill_t43 -INTEGER :: chill_t42 -INTEGER :: chill_t41 -INTEGER :: chill_t40 -INTEGER :: chill_t39 -INTEGER :: chill_t38 -INTEGER :: chill_t37 -INTEGER :: chill_t36 -INTEGER :: chill_t35 -INTEGER :: chill_t34 -INTEGER :: chill_t33 -INTEGER :: chill_t32 -INTEGER :: chill_t31 -INTEGER :: chill_t30 -INTEGER :: chill_t29 -INTEGER :: chill_t28 -INTEGER :: chill_t27 -INTEGER :: chill_t26 -INTEGER :: chill_t25 -INTEGER :: chill_t24 -INTEGER :: chill_t23 -INTEGER :: over1 -INTEGER :: chill_t22 -INTEGER :: chill_t21 -INTEGER :: chill_t20 -INTEGER :: chill_t19 -INTEGER :: chill_t18 -INTEGER :: chill_t17 -INTEGER :: chill_t16 -INTEGER :: chill_t15 -REAL(kind=8), DIMENSION(8,512) :: f_P2 -INTEGER :: chill_t14 -INTEGER :: chill_t13 -INTEGER :: chill_t12 -INTEGER :: chill_t11 -INTEGER :: chill_t10 -INTEGER :: chill_t9 -INTEGER :: chill_t8 -INTEGER :: chill_t7 -REAL(kind=8), DIMENSION(512,128) :: f_P1 -INTEGER :: chill_t1 -INTEGER :: chill_t2 -INTEGER :: chill_t4 -INTEGER :: chill_t6 -INTEGER :: chill_t5 -INTEGER :: N -REAL(kind=8) :: A(N,N), B(N,N), C(N,N) -INTEGER :: I, J, K -over1 = 0 -over2 = 0 -DO t2 = 1, N, 512 -DO t4 = 1, N, 128 -DO t6 = t2, merge(N,t2 + 511,N <= t2 + 511), 1 -DO t8 = t4, merge(t4 + 127,N,t4 + 127 <= N), 1 -f_P1(t8 - t4 + 1,t6 - t2 + 1) = A(t8,t6) -END DO -END DO -DO t6 = 1, N, 8 -DO t8 = t6, merge(N,t6 + 7,N <= t6 + 7), 1 -DO t10 = t2, merge(N,t2 + 511,N <= t2 + 511), 1 -f_P2(t10 - t2 + 1,t8 - t6 + 1) = B(t10,t8) -END DO -END DO -over1 = MOD(N,2) -DO t8 = t4, merge(-over1 + N,t4 + 126,-over1 + N <= t4 + 126), 2 -over2 = MOD(N,2) -DO t10 = t6, merge(t6 + 6,N - over2,t6 + 6 <= N - over2), 2 -DO t12 = t2, merge(t2 + 511,N,t2 + 511 <= N), 1 -C(t8,t10) = C(t8,t10) + f_P1(t8 - t4 + 1,t12 - t2 + 1) * f_P2(t12 - t2 + 1,t10 - t6 + 1) -C(t8 + 1,t10) = C(t8 + 1,t10) + f_P1(t8 + 1 - t4 + 1,t12 - t2 + 1) * f_P2(t12 - t2 + 1,t10 - t6 + 1) -C(t8,t10 + 1) = C(t8,t10 + 1) + f_P1(t8 - t4 + 1,t12 - t2 + 1) * f_P2(t12 - t2 + 1,t10 + 1 - t6 + 1) -C(t8 + 1,t10 + 1) = C(t8 + 1,t10 + 1) + f_P1(t8 + 1 - t4 + 1,t12 - t2 + 1) * f_P2(t12 - t2 + 1,t10 + 1 - t6 + 1) -END DO -END DO -IF (N - 7 <= t6 .AND. 1 <= over2) THEN -DO t12 = t2, merge(N,t2 + 511,N <= t2 + 511), 1 -C(t8,N) = C(t8,N) + f_P1(t8 - t4 + 1,t12 - t2 + 1) * f_P2(t12 - t2 + 1,N - t6 + 1) -C(t8 + 1,N) = C(t8 + 1,N) + f_P1(t8 + 1 - t4 + 1,t12 - t2 + 1) * f_P2(t12 - t2 + 1,N - t6 + 1) -END DO -END IF -END DO -IF (N - 127 <= t4 .AND. 1 <= over1) THEN -DO t10 = t6, merge(t6 + 7,N,t6 + 7 <= N), 1 -DO t12 = t2, merge(t2 + 511,N,t2 + 511 <= N), 1 -C(N,t10) = C(N,t10) + f_P1(N - t4 + 1,t12 - t2 + 1) * f_P2(t12 - t2 + 1,t10 - t6 + 1) -END DO -END DO -END IF -END DO -END DO -END DO -END SUBROUTINE - diff --git a/graph-test.cc b/graph-test.cc deleted file mode 100644 index 3cdcbee..0000000 --- a/graph-test.cc +++ /dev/null @@ -1,148 +0,0 @@ -#include "graph.hh" - -using std::cout; -using std::endl; -template<typename T> -struct A { -}; - -template struct Graph<Empty,Empty>; - -int main() { - Graph<> g; - - for (int i = 0; i < 8; i++) - g.insert(); - - std::vector<Empty> t; - t.push_back(Empty()); - t.push_back(Empty()); - - g.connect(0,1); - g.connect(1,4); - g.connect(4,0); - g.connect(4,5); - g.connect(1,5); - g.connect(1,2); - g.connect(2,3); - g.connect(3,2); - g.connect(2,6); - g.connect(5,6); - g.connect(6,5); - g.connect(6,7); - g.connect(3,7); - g.connect(7,7,t); - - g.insert(); - g.insert(); - g.connect(9,8); - g.connect(8,0); - - cout << "Graph #1:" << endl; - cout << g; - - std::vector<std::set<int> > r = g.topoSort(); - - cout << "topological order: "; - int num_scc = 0; - for (int i = 0; i < r.size(); i++) { - if (i != 0) - cout << ' '; - if (r[i].size() > 1) { - cout << '('; - num_scc++; - } - for (std::set<int>::iterator j = r[i].begin(); j != r[i].end(); j++) { - if (j != r[i].begin()) - cout << ' '; - cout << (*j+1); - } - if (r[i].size() > 1) - cout << ')'; - } - cout << endl; - cout << "total number of SCC: " << num_scc << endl; - - Graph<> g2; - - for (int i = 0; i < 6; i++) - g2.insert(); - - g2.connect(0,1); - g2.connect(0,2); - g2.connect(3,4); - g2.connect(3,5); - g2.connect(3,2); - g2.connect(5,0); - - cout << endl << "Graph #2:" << endl; - cout << g2; - - std::vector<std::set<int> > r2 = g2.packed_topoSort(); - - cout << "packed topological order: "; - for (int i = 0; i < r2.size(); i++) { - if (i != 0) - cout << ' '; - if (r2[i].size() > 1) - cout << '('; - for (std::set<int>::iterator j = r2[i].begin(); j != r2[i].end(); j++) { - if (j != r2[i].begin()) - cout << ' '; - cout << (*j+1); - } - if (r2[i].size() > 1) - cout << ')'; - } - cout << endl; - - Graph<> g3; - - for (int i = 0; i < 6; i++) - g3.insert(); - - g3.connect(5,2); - g3.connect(5,3); - g3.connect(5,4); - g3.connect(3,1); - g3.connect(1,0); - - cout << endl << "Graph #3:" << endl; - cout << g3; - - std::vector<std::set<int> > r3 = g3.topoSort(); - - cout << "topological order: "; - for (int i = 0; i < r3.size(); i++) { - if (i != 0) - cout << ' '; - if (r3[i].size() > 1) - cout << '('; - for (std::set<int>::iterator j = r3[i].begin(); j != r3[i].end(); j++) { - if (j != r3[i].begin()) - cout << ' '; - cout << (*j+1); - } - if (r3[i].size() > 1) - cout << ')'; - } - cout << endl; - - r3 = g3.packed_topoSort(); - - cout << "packed topological order: "; - for (int i = 0; i < r3.size(); i++) { - if (i != 0) - cout << ' '; - if (r3[i].size() > 1) - cout << '('; - for (std::set<int>::iterator j = r3[i].begin(); j != r3[i].end(); j++) { - if (j != r3[i].begin()) - cout << ' '; - cout << (*j+1); - } - if (r3[i].size() > 1) - cout << ')'; - } - cout << endl; -} @@ -76,7 +76,8 @@ template<typename VertexType, typename EdgeType> std::ostream& operator<<(std::ostream &os, const Graph<VertexType, EdgeType> &g) { for (int i = 0; i < g.vertex.size(); i++) for (typename Graph<VertexType,EdgeType>::EdgeList::const_iterator j = g.vertex[i].second.begin(); j != g.vertex[i].second.end(); j++) { - os << "s" << i << "->" << "s" << j->first << ":"; + // os << i+1 << "->" << j->first+1 << ":"; + os << "s" << i << "->" << "s" << j->first << ":"; for (typename std::vector<EdgeType>::const_iterator k = j->second.begin(); k != j->second.end(); k++) os << " " << *k; os << std::endl; diff --git a/include/ir_suif.hh b/include/ir_suif.hh deleted file mode 120000 index 37f4ae8..0000000 --- a/include/ir_suif.hh +++ /dev/null @@ -1 +0,0 @@ -../ir_suif.hh
\ No newline at end of file diff --git a/include/ir_suif_utils.hh b/include/ir_suif_utils.hh deleted file mode 120000 index 327320d..0000000 --- a/include/ir_suif_utils.hh +++ /dev/null @@ -1 +0,0 @@ -../ir_suif_utils.hh
\ No newline at end of file diff --git a/ir_cuda_rose_utils.cc b/ir_cuda_rose_utils.cc deleted file mode 100644 index e7b4c37..0000000 --- a/ir_cuda_rose_utils.cc +++ /dev/null @@ -1,191 +0,0 @@ -/***************************************************************************** - Copyright (C) 2008 University of Southern California - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - SUIF interface utilities. - - Notes: - - Update history: - 01/2006 created by Chun Chen -*****************************************************************************/ - -//#include <suif1.h> -#include "ir_rose_utils.hh" - - -/** - * Returns the body of the for loop found by finding the first loop in - * code, and if level > 1 recursively calling on the body of the found - * loop and (level-1) - */ -SgNode* loop_body_at_level(SgNode* tnl, int level) { - SgNode *inner_nl = 0; - //Now strip out the tnl on the inner level of the for loop - //tree_node_list_iter tnli(tnl); - - if (isSgBasicBlock(tnl)) { - - SgStatementPtrList& tnli = isSgBasicBlock(tnl)->get_statements(); - - for (SgStatementPtrList::iterator it = tnli.begin(); it != tnli.end(); - it++) { - if (isSgForStatement(*it)) { - inner_nl = loop_body_at_level(isSgForStatement(*it), level); - break; - } - - } - - } - - return inner_nl; -} - -SgNode* loop_body_at_level(SgForStatement* loop, int level) { - if (level > 1) - return loop_body_at_level(loop->get_loop_body(), level - 1); - return loop->get_loop_body(); -} - -void swap_node_for_node_list(SgNode* tn, SgNode* new_tnl) { - SgStatement *s = isSgStatement(tn); - - SgStatement* p; - if (s != 0) { - p = isSgStatement(tn->get_parent()); - - if (p != 0) { - - if (isSgBasicBlock(new_tnl)) { - - /*SgStatementPtrList & list_ = - isSgBasicBlock(new_tnl)->get_statements(); - - if (isSgForStatement(p)) { - if (!isSgBasicBlock(isSgForStatement(p)->get_loop_body())) - p->replace_statement(s, isSgStatement(new_tnl)); - else { - p->insert_statement(s, list_, true); - p->remove(s); - } - } else { - p->insert_statement(s, list_, true); - p->remove(s); - } - */ - if (isSgForStatement(p)) { - if (!isSgBasicBlock(isSgForStatement(p)->get_loop_body())) - p->replace_statement(s, isSgStatement(new_tnl)); - else { - - SgStatementPtrList& list_ = - isSgBasicBlock(new_tnl)->get_statements(); - - //std::vector<SgStatement*> list; - - SgStatementPtrList::iterator it = list_.begin(); - SgStatement* begin = *it; - begin->set_parent(p); - - p->replace_statement(s, begin); - it++; - //SgStatement* stmt = first; - SgStatement* temp = begin; - for (; it != list_.end(); it++) { - (*it)->set_parent(p); - p->insert_statement(temp, *it, false); - temp = *it; - } - - } - - } else { - - - SgStatementPtrList& list_ = - isSgBasicBlock(new_tnl)->get_statements(); - - //std::vector<SgStatement*> list; - - SgStatementPtrList::iterator it = list_.begin(); - SgStatement* begin = *it; - begin->set_parent(p); - - p->replace_statement(s, begin); - it++; - //SgStatement* stmt = first; - SgStatement* temp = begin; - for (; it != list_.end(); it++) { - (*it)->set_parent(p); - p->insert_statement(temp, *it, false); - temp = *it; - } - - } - - /* SgStatement* temp = s; - - SgStatementPtrList::iterator it = list_.begin(); - p->insert_statement(temp, *it, true); - temp = *it; - p->remove_statement(s); - it++; - for (; it != list_.end(); it++) { - p->insert_statement(temp, *it, false); - temp = *it; - } - - // new_tnl->set_parent(p); - //new_tnl->get_statements(); - SgStatementPtrList& list = - isSgBasicBlock(new_tnl)->get_statements(); - - //std::vector<SgStatement*> list; - - SgStatementPtrList::iterator it = list.begin(); - SgStatement* begin = *it; - begin->set_parent(p); - - p->replace_statement(s, begin); - it++; - //SgStatement* stmt = first; - SgStatement* temp = begin; - for (; it != list.end(); it++) { - (*it)->set_parent(p); - p->insert_statement(temp, *it, false); - temp = *it; - } - */ - /* SgStatementPtrList& stmt_list = isSgBasicBlock(new_tnl)->get_statements(); - SgStatement* target = s; - - for(SgStatementPtrList::iterator it = stmt_list.begin() ; it != stmt_list.end(); it++) - { - isSgNode(*it)->set_parent(p); - p->insert_statement(isSgStateme, *it, false); - target = *it; - } - - p->remove_statement(s); - - */ - }else if(isSgIfStmt(p)) { - - if(isSgIfStmt(p)->get_true_body() == s) - isSgIfStmt(p)->set_true_body(isSgStatement(new_tnl)); - else if(isSgIfStmt(p)->get_false_body() == s) - isSgIfStmt(p)->set_false_body(isSgStatement(new_tnl)); - new_tnl->set_parent(p); - } - else { - p->replace_statement(s, isSgStatement(new_tnl)); - new_tnl->set_parent(p); - } - } - - } - // return isSgNode(p); -} diff --git a/ir_cuda_suif_utils.cc b/ir_cuda_suif_utils.cc deleted file mode 100644 index f15c190..0000000 --- a/ir_cuda_suif_utils.cc +++ /dev/null @@ -1,54 +0,0 @@ -/***************************************************************************** - Copyright (C) 2008 University of Southern California - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - SUIF interface utilities. - - Notes: - - Update history: - 01/2006 created by Chun Chen -*****************************************************************************/ - -#include <suif1.h> -#include "ir_suif_utils.hh" - - -/** - * Returns the body of the for loop found by finding the first loop in - * code, and if level > 1 recursively calling on the body of the found - * loop and (level-1) - */ -tree_node_list* loop_body_at_level(tree_node_list* tnl, int level) -{ - tree_node_list *inner_nl = 0; - //Now strip out the tnl on the inner level of the for loop - tree_node_list_iter tnli(tnl); - while (!tnli.is_empty()) { - tree_node *node = tnli.step(); - if(node->kind() == TREE_FOR) - { - //Found the first tree_for, call sibling function - inner_nl = loop_body_at_level((tree_for*)node, level); - break; - } - } - return inner_nl; -} - -tree_node_list* loop_body_at_level(tree_for* loop, int level) -{ - if(level > 1) - return loop_body_at_level(loop->body(), level-1); - return loop->body(); -} - -tree_node_list* swap_node_for_node_list(tree_node* tn, tree_node_list* new_tnl) -{ - tree_node_list* tnl = tn->parent(); - tnl->insert_after(new_tnl, tn->list_e()); - delete tnl->remove(tn->list_e()); - return tnl; -} diff --git a/ir_cudarose.cc b/ir_cudarose.cc deleted file mode 100644 index 6b31bdd..0000000 --- a/ir_cudarose.cc +++ /dev/null @@ -1,165 +0,0 @@ -/***************************************************************************** - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - CHiLL's SUIF interface. - - Notes: - Array supports mixed pointer and array type in a single declaration. - - History: - 2/2/2011 Created by Protonu Basu. -*****************************************************************************/ - -#include <typeinfo> -#include "ir_cudarose.hh" -#include "loop.hh" -#include "loop_cuda_rose.hh" -//#include "ir_suif_utils.hh" - -using namespace SageBuilder; -using namespace SageInterface; - -IR_cudaroseCode::IR_cudaroseCode(const char *filename, const char* proc_name) : - IR_roseCode(filename, proc_name) { - - //std::string file_suffix = StringUtility::fileNameSuffix(filename); - - //if (CommandlineProcessing::isCFileNameSuffix(file_suffix)) - //{ - std::string orig_name = StringUtility::stripPathFromFileName(filename); - std::string naked_name = StringUtility::stripFileSuffixFromFileName( - orig_name); - file->set_unparse_output_filename("rose_" + naked_name + ".cu"); - - //} - - gsym_ = root; - first_scope = firstScope; - parameter = symtab2_; - body = symtab3_; - defn = func->get_definition()->get_body(); - func_defn = func->get_definition(); -} - - - -IR_ArraySymbol *IR_cudaroseCode::CreateArraySymbol(const IR_Symbol *sym, - std::vector<omega::CG_outputRepr *> &size, int sharedAnnotation) { - SgType *tn; - SgVariableSymbol* vs; - if (typeid(*sym) == typeid(IR_roseScalarSymbol)) { - tn = static_cast<const IR_roseScalarSymbol *>(sym)->vs_->get_type(); - } else if (typeid(*sym) == typeid(IR_roseArraySymbol)) { - tn = static_cast<const IR_roseArraySymbol *>(sym)->vs_->get_type(); - while (isSgArrayType(tn) || isSgPointerType(tn)) { - if (isSgArrayType(tn)) - tn = isSgArrayType(tn)->get_base_type(); - else if (isSgPointerType(tn)) - tn = isSgPointerType(tn)->get_base_type(); - else - throw ir_error( - "in CreateScalarSymbol: symbol not an array nor a pointer!"); - } - } else - throw std::bad_typeid(); - - for (int i = size.size() - 1; i >= 0; i--) - tn = buildArrayType(tn, - static_cast<omega::CG_roseRepr *>(size[i])->GetExpression()); - - static int rose_array_counter = 1; - std::string s = std::string("_P") + omega::to_string(rose_array_counter++); - SgVariableDeclaration* defn2 = buildVariableDeclaration( - const_cast<char *>(s.c_str()), tn); - SgInitializedNamePtrList& variables2 = defn2->get_variables(); - - SgInitializedNamePtrList::const_iterator i2 = variables2.begin(); - SgInitializedName* initializedName2 = *i2; - vs = new SgVariableSymbol(initializedName2); - - prependStatement(defn2, - isSgScopeStatement(func->get_definition()->get_body())); - - vs->set_parent(symtab_); - symtab_->insert(SgName(s.c_str()), vs); - - SgStatementPtrList* tnl5 = new SgStatementPtrList; - - (*tnl5).push_back(isSgStatement(defn2)); - - omega::CG_roseRepr* stmt = new omega::CG_roseRepr(tnl5); - - init_code_ = ocg_->StmtListAppend(init_code_, - static_cast<omega::CG_outputRepr *>(stmt)); - - if (sharedAnnotation == 1) - isSgNode(defn2)->setAttribute("__shared__", - new AstTextAttribute("__shared__")); - - return new IR_roseArraySymbol(this, vs); -} - -bool IR_cudaroseCode::commit_loop(Loop *loop, int loop_num) { - if (loop == NULL) - return true; - - LoopCuda *cu_loop = (LoopCuda *) loop; - SgNode *tnl = cu_loop->codegen(); - if (!tnl) - return false; - - SgStatementPtrList* new_list = NULL; - if (isSgBasicBlock(tnl)) { - new_list = new SgStatementPtrList; - for (SgStatementPtrList::iterator it = - isSgBasicBlock(tnl)->get_statements().begin(); - it != isSgBasicBlock(tnl)->get_statements().end(); it++) - (*new_list).push_back(*it); - } - - //Only thing that should be left will be the inserting of the tnl* into the loop - omega::CG_outputRepr *repr; - if (new_list == NULL) - repr = new omega::CG_roseRepr(tnl); - else - repr = new omega::CG_roseRepr(new_list); - if (cu_loop->init_code != NULL) - repr = ocg_->StmtListAppend(cu_loop->init_code->clone(), repr); - - std::vector<SgForStatement *> loops = find_loops( - func->get_definition()->get_body()); - tnl = isSgNode(loops[loop_num])->get_parent(); - - if (cu_loop->setup_code != NULL) { - SgStatementPtrList* setup_tnl = - static_cast<omega::CG_roseRepr *>(cu_loop->setup_code)->GetList(); - - SgStatement* target = isSgStatement(loops[loop_num]); - - for (SgStatementPtrList::iterator it = (*setup_tnl).begin(); - it != (*setup_tnl).end(); it++) { - - isSgStatement(tnl)->insert_statement(target, *it, false); - isSgNode(*it)->set_parent(tnl); - target = *it; - } - - //SgStatementPtrList - // for SgStatementPtrList::it - //TODO: I think this is a hack we can undo if we have loop->codegen() - //loo->getCode(), maybe also get rid of setup and teardown... - //fix_unfinished_comment(setup_tnl, indexes_string); - //isSgStatement(tnl)->replace_statement(isSgStatement(loops[loop_num]), *setup_tnl); - isSgStatement(tnl)->remove_statement(isSgStatement(loops[loop_num])); - } - - delete repr; - - return true; -} - -IR_cudaroseCode::~IR_cudaroseCode() { -} - diff --git a/ir_cudarose.hh b/ir_cudarose.hh deleted file mode 100644 index 34e0404..0000000 --- a/ir_cudarose.hh +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef IR_CUDA_ROSE -#define IR_CUDA_ROSE - -#include <code_gen/CG_roseRepr.h> -#include <code_gen/CG_roseBuilder.h> -#include "ir_rose.hh" -#include "loop.hh" -#include "loop_cuda_rose.hh" -#include "ir_rose_utils.hh" - - - -class IR_cudaroseCode : public IR_roseCode{ - -public: - - - IR_cudaroseCode(const char *filename, const char* proc_name); - - - - SgGlobal *gsym_; - SgScopeStatement* defn; - SgGlobal* first_scope; - SgSymbolTable* parameter; - SgSymbolTable* body; - SgFunctionDefinition* func_defn; - std::vector<SgSymbolTable*> write_procs;//procs to write - - - IR_ArraySymbol *CreateArraySymbol(const IR_Symbol *sym, std::vector<omega::CG_outputRepr *> &size,int sharedAnnotation = 1); - omega::CG_outputRepr* init_code(){ return init_code_; } - bool commit_loop(Loop *loop, int loop_num); - std::vector<SgForStatement *> get_loops() - { - std::vector<SgForStatement *> loops = find_loops(func->get_definition()->get_body()); - return loops; - } - - ~IR_cudaroseCode(); - -}; - - -#endif - diff --git a/ir_cudasuif.cc b/ir_cudasuif.cc deleted file mode 100644 index c646e13..0000000 --- a/ir_cudasuif.cc +++ /dev/null @@ -1,144 +0,0 @@ -/***************************************************************************** - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - CHiLL's SUIF interface. - - Notes: - Array supports mixed pointer and array type in a single declaration. - - History: - 2/2/2011 Created by Protonu Basu. -*****************************************************************************/ - -#include <typeinfo> -#include "ir_cudasuif.hh" -#include "loop.hh" -#include "loop_cuda.hh" -#include "ir_suif_utils.hh" - - -IR_cudasuifCode::IR_cudasuifCode(const char *filename, int proc_num) - :IR_suifCode(filename, proc_num) -{ - //setting up gsym_ here - fileset->reset_iter(); - gsym_ = fileset->globals(); - -} - - - -IR_ArraySymbol *IR_cudasuifCode::CreateArraySymbol(const IR_Symbol *sym, - std::vector<omega::CG_outputRepr *> &size, - int sharedAnnotation) -{ - type_node *tn; - - if (typeid(*sym) == typeid(IR_suifScalarSymbol)) { - tn = static_cast<const IR_suifScalarSymbol *>(sym)->vs_->type(); - } - else if (typeid(*sym) == typeid(IR_suifArraySymbol)) { - tn = static_cast<const IR_suifArraySymbol *>(sym)->vs_->type(); - if (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - while (tn->is_array() || tn->is_ptr()) { - if (tn->is_array()) - tn = static_cast<array_type *>(tn)->elem_type(); - else if (tn->is_ptr()) - tn = static_cast<ptr_type *>(tn)->ref_type(); - } - } - else - throw std::bad_typeid(); - - if (is_fortran_) - for (int i = 0; i < size.size(); i++) { - var_sym *temporary = symtab_->new_unique_var(type_s32); - init_code_ = ocg_->StmtListAppend(init_code_, ocg_->StmtListAppend(ocg_->CreateAssignment(0, new omega::CG_suifRepr(operand(temporary)), size[i]),NULL)); - - tn = new array_type(tn, array_bound(1), array_bound(temporary)); - symtab_->add_type(tn); - } - else - for (int i = size.size()-1; i >= 0; i--) { - var_sym *temporary = symtab_->new_unique_var(type_s32); - //init_code_ = ocg_->StmtListAppend(init_code_, ocg_->CreateStmtList(ocg_->CreateAssignment(0, new omega::CG_suifRepr(operand(temporary)), size[i]))); - init_code_ = ocg_->StmtListAppend(init_code_, ocg_->StmtListAppend(ocg_->CreateAssignment(0, new omega::CG_suifRepr(operand(temporary)), size[i]), NULL)); - - tn = new array_type(tn, array_bound(1), array_bound(temporary)); - symtab_->add_type(tn); - if(i == 0 && sharedAnnotation == 1){ - tn = static_cast<omega::CG_suifBuilder*>(ocg_)->ModifyType(tn, "__shared__"); - symtab_->add_type(tn); - } - } - - static int suif_array_counter = 1; - std::string s = std::string("_P") + omega::to_string(suif_array_counter++); - var_sym *vs = new var_sym(tn, const_cast<char *>(s.c_str())); - vs->add_to_table(symtab_); - - return new IR_suifArraySymbol(this, vs); -} - - -bool IR_cudasuifCode::commit_loop(Loop *loop, int loop_num) { - if (loop == NULL) - return true; - - //Call code-gen part of any scripting routines that were run. - // internally call GetCode - // Add stuff before and after (setup, teardown - // return a tnl - LoopCuda *cu_loop = (LoopCuda *)loop; - tree_node_list *tnl = cu_loop->codegen(); - if(!tnl) - return false; - - //set up our new procs - for(int i=0; i<cu_loop->new_procs.size(); i++) - { - printf("setting proc fse\n"); - cu_loop->new_procs[i]->set_fse(fse_); - write_procs.push_back(cu_loop->new_procs[i]); - } - - //Only thing that should be left will be the inserting of the tnl* into the loop - - omega::CG_outputRepr *repr = new omega::CG_suifRepr(tnl); - if (cu_loop->init_code != NULL) - repr = ocg_->StmtListAppend(cu_loop->init_code->clone(), repr); - - std::vector<tree_for *> loops = find_loops(psym_->block()->body()); - tnl = loops[loop_num]->parent(); - - if (cu_loop->setup_code != NULL) { - tree_node_list *setup_tnl = static_cast<omega::CG_suifRepr *>(cu_loop->setup_code->clone())->GetCode(); - //TODO: I think this is a hack we can undo if we have loop->codegen() - //loo->getCode(), maybe also get rid of setup and teardown... - //fix_unfinished_comment(setup_tnl, indexes_string); - tnl->insert_before(setup_tnl, loops[loop_num]->list_e()); - } - tnl->insert_before(static_cast<omega::CG_suifRepr *>(repr)->GetCode(), loops[loop_num]->list_e()); - if (cu_loop->teardown_code != NULL) { - tree_node_list *setup_tnl = static_cast<omega::CG_suifRepr *>(cu_loop->teardown_code->clone())->GetCode(); - tnl->insert_before(setup_tnl, loops[loop_num]->list_e()); - } - - tnl->remove(loops[loop_num]->list_e()); - - delete repr; - return true; -} - -IR_cudasuifCode::~IR_cudasuifCode() -{ - for(int i=0; i<write_procs.size(); i++) - { - if (!write_procs[i]->is_written()) - write_procs[i]->write_proc(fse_); - write_procs[i]->flush_proc(); - } -} diff --git a/ir_cudasuif.hh b/ir_cudasuif.hh deleted file mode 100644 index 834778e..0000000 --- a/ir_cudasuif.hh +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef IR_CUDA_SUIF -#define IR_CUDA_SUIF - -#include <code_gen/CG_suifRepr.h> -#include <code_gen/CG_suifBuilder.h> -#include "ir_suif.hh" -#include "loop.hh" -#include "loop_cuda.hh" -#include "ir_suif_utils.hh" - - - -class IR_cudasuifCode : public IR_suifCode{ - -public: - global_symtab *gsym_; - std::vector<proc_sym*> write_procs;//procs to write - - - IR_cudasuifCode(const char *filename, int proc_num); - IR_ArraySymbol *CreateArraySymbol(const IR_Symbol *sym, - std::vector<omega::CG_outputRepr *> &size, - int sharedAnnotation = 1); - omega::CG_outputRepr* init_code(){ return init_code_; } - bool commit_loop(Loop *loop, int loop_num); - std::vector<tree_for *> get_loops() - { - std::vector<tree_for *> loops = find_loops(psym_->block()->body()); - return loops; - } - ~IR_cudasuifCode(); - -}; - - -#endif diff --git a/ir_suif.cc b/ir_suif.cc deleted file mode 100644 index a0ea357..0000000 --- a/ir_suif.cc +++ /dev/null @@ -1,1438 +0,0 @@ -/***************************************************************************** - Copyright (C) 2009-2011 University of Utah - All Rights Reserved. - - Purpose: - CHiLL's SUIF interface. - - Notes: - Array supports mixed pointer and array type in a single declaration. - - History: - 02/23/2009 Created by Chun Chen. -*****************************************************************************/ - -#include <typeinfo> -#include <useful.h> -#include "ir_suif.hh" -#include "ir_suif_utils.hh" -#include "chill_error.hh" - -// ---------------------------------------------------------------------------- -// Class: IR_suifScalarSymbol -// ---------------------------------------------------------------------------- - -std::string IR_suifScalarSymbol::name() const { - return vs_->name(); -} - - -int IR_suifScalarSymbol::size() const { - return vs_->type()->size(); -} - - -bool IR_suifScalarSymbol::operator==(const IR_Symbol &that) const { - if (typeid(*this) != typeid(that)) - return false; - - const IR_suifScalarSymbol *l_that = static_cast<const IR_suifScalarSymbol *>(&that); - return this->vs_ == l_that->vs_; -} - -IR_Symbol *IR_suifScalarSymbol::clone() const { - return new IR_suifScalarSymbol(ir_, vs_); -} - -// ---------------------------------------------------------------------------- -// Class: IR_suifArraySymbol -// ---------------------------------------------------------------------------- - -std::string IR_suifArraySymbol::name() const { - return vs_->name(); -} - - -int IR_suifArraySymbol::elem_size() const { - type_node *tn = vs_->type(); - if (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - - while (tn->is_array()) - tn = static_cast<array_type *>(tn)->elem_type(); - - return tn->size(); -} - - -int IR_suifArraySymbol::n_dim() const { - type_node *tn = vs_->type(); - if (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - - int n = 0; - while (true) { - if (tn->is_array()) { - n++; - tn = static_cast<array_type *>(tn)->elem_type(); - } - else if (tn->is_ptr()) { - n++; - tn = static_cast<ptr_type *>(tn)->ref_type(); - } - else - break; - } - - return n - indirect_; -} - - -omega::CG_outputRepr *IR_suifArraySymbol::size(int dim) const { - type_node *tn = vs_->type(); - if (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - - for (int i = 0; i < dim; i++) { - if (tn->is_array()) - tn = static_cast<array_type *>(tn)->elem_type(); - else if (tn->is_ptr()) - tn = static_cast<ptr_type *>(tn)->ref_type(); - else - throw ir_error("array parsing error"); - } - if (tn->is_ptr()) - return new omega::CG_suifRepr(operand()); - else if (!tn->is_array()) - throw ir_error("array parsing error"); - - array_bound ub = static_cast<array_type *>(tn)->upper_bound(); - int c = 1; - omega::CG_outputRepr *ub_repr = NULL; - if (ub.is_constant()) - c += ub.constant(); - else if (ub.is_variable()) { - var_sym *vs = ub.variable(); - - if (static_cast<const IR_suifCode *>(ir_)->init_code_ != NULL) { - tree_node_list *tnl = static_cast<omega::CG_suifRepr *>(static_cast<const IR_suifCode *>(ir_)->init_code_)->GetCode(); - tree_node_list_iter iter(tnl); - while(!iter.is_empty()) { - tree_node *tn = iter.step(); - if (tn->is_instr()) { - instruction *ins = static_cast<tree_instr *>(tn)->instr(); - operand dst = ins->dst_op(); - if (dst.is_symbol() && dst.symbol() == vs) { - operand op; - if (ins->opcode() == io_cpy) - op = ins->src_op(0).clone(); - else - op = operand(ins->clone()); - - ub_repr = new omega::CG_suifRepr(op); - break; - } - } - } - } - if (ub_repr == NULL) - ub_repr = new omega::CG_suifRepr(operand(vs)); - } - else - throw ir_error("array parsing error"); - - array_bound lb = static_cast<array_type *>(tn)->lower_bound(); - omega::CG_outputRepr *lb_repr = NULL; - if (lb.is_constant()) - c -= lb.constant(); - else if (lb.is_variable()) { - var_sym *vs = ub.variable(); - - tree_node_list *tnl = static_cast<omega::CG_suifRepr *>(static_cast<const IR_suifCode *>(ir_)->init_code_)->GetCode(); - tree_node_list_iter iter(tnl); - while(!iter.is_empty()) { - tree_node *tn = iter.step(); - if (tn->is_instr()) { - instruction *ins = static_cast<tree_instr *>(tn)->instr(); - operand dst = ins->dst_op(); - if (dst.is_symbol() && dst.symbol() == vs) { - operand op; - if (ins->opcode() == io_cpy) - op = ins->src_op(0).clone(); - else - op = operand(ins->clone()); - - lb_repr = new omega::CG_suifRepr(op); - break; - } - } - } - if (lb_repr == NULL) - lb_repr = new omega::CG_suifRepr(operand(vs)); - } - else - throw ir_error("array parsing error"); - - omega::CG_outputRepr *repr = ir_->builder()->CreateMinus(ub_repr, lb_repr); - if (c != 0) - repr = ir_->builder()->CreatePlus(repr, ir_->builder()->CreateInt(c)); - - return repr; -} - - -IR_ARRAY_LAYOUT_TYPE IR_suifArraySymbol::layout_type() const { - if (static_cast<const IR_suifCode *>(ir_)->is_fortran_) - return IR_ARRAY_LAYOUT_COLUMN_MAJOR; - else - return IR_ARRAY_LAYOUT_ROW_MAJOR; -} - - -bool IR_suifArraySymbol::operator==(const IR_Symbol &that) const { - if (typeid(*this) != typeid(that)) - return false; - - const IR_suifArraySymbol *l_that = static_cast<const IR_suifArraySymbol *>(&that); - return this->vs_ == l_that->vs_ && this->offset_ == l_that->offset_; -} - - -IR_Symbol *IR_suifArraySymbol::clone() const { - return new IR_suifArraySymbol(ir_, vs_, indirect_, offset_); -} - -// ---------------------------------------------------------------------------- -// Class: IR_suifConstantRef -// ---------------------------------------------------------------------------- - -bool IR_suifConstantRef::operator==(const IR_Ref &that) const { - if (typeid(*this) != typeid(that)) - return false; - - const IR_suifConstantRef *l_that = static_cast<const IR_suifConstantRef *>(&that); - - if (this->type_ != l_that->type_) - return false; - - if (this->type_ == IR_CONSTANT_INT) - return this->i_ == l_that->i_; - else - return this->f_ == l_that->f_; -} - - -omega::CG_outputRepr *IR_suifConstantRef::convert() { - if (type_ == IR_CONSTANT_INT) { - omega::CG_suifRepr *result = new omega::CG_suifRepr(operand(static_cast<int>(i_), type_s32)); - delete this; - return result; - } - else - throw ir_error("constant type not supported"); -} - - -IR_Ref *IR_suifConstantRef::clone() const { - if (type_ == IR_CONSTANT_INT) - return new IR_suifConstantRef(ir_, i_); - else if (type_ == IR_CONSTANT_FLOAT) - return new IR_suifConstantRef(ir_, f_); - else - throw ir_error("constant type not supported"); -} - - -// ---------------------------------------------------------------------------- -// Class: IR_suifScalarRef -// ---------------------------------------------------------------------------- - -bool IR_suifScalarRef::is_write() const { - if (ins_pos_ != NULL && op_pos_ == -1) - return true; - else - return false; -} - - -IR_ScalarSymbol *IR_suifScalarRef::symbol() const { - return new IR_suifScalarSymbol(ir_, vs_); -} - - -bool IR_suifScalarRef::operator==(const IR_Ref &that) const { - if (typeid(*this) != typeid(that)) - return false; - - const IR_suifScalarRef *l_that = static_cast<const IR_suifScalarRef *>(&that); - - if (this->ins_pos_ == NULL) - return this->vs_ == l_that->vs_; - else - return this->ins_pos_ == l_that->ins_pos_ && this->op_pos_ == l_that->op_pos_; -} - - -omega::CG_outputRepr *IR_suifScalarRef::convert() { - omega::CG_suifRepr *result = new omega::CG_suifRepr(operand(vs_)); - delete this; - return result; -} - - -IR_Ref * IR_suifScalarRef::clone() const { - if (ins_pos_ == NULL) - return new IR_suifScalarRef(ir_, vs_); - else - return new IR_suifScalarRef(ir_, ins_pos_, op_pos_); -} - - -// ---------------------------------------------------------------------------- -// Class: IR_suifArrayRef -// ---------------------------------------------------------------------------- - -bool IR_suifArrayRef::is_write() const { - return ::is_lhs(const_cast<in_array *>(ia_)); -} - - -omega::CG_outputRepr *IR_suifArrayRef::index(int dim) const { - operand op = find_array_index(ia_, n_dim(), dim, static_cast<const IR_suifCode *>(ir_)->is_fortran_); - return new omega::CG_suifRepr(op.clone()); -} - - -IR_ArraySymbol *IR_suifArrayRef::symbol() const { - in_array *current = ia_; - - // find the indirectness of the symbol, i.e., if it is (**A)[i,j] - int indirect = 0; - if (!static_cast<const IR_suifCode *>(ir_)->is_fortran_) { - operand op = ia_->base_op(); - while (op.is_instr()) { - instruction *ins = op.instr(); - if (ins->opcode() == io_lod) { - indirect++; - op = ins->src_op(0); - } - else - break; - } - if (op.is_symbol()) - indirect++; - } - - while (true) { - operand op = current->base_op(); - if (op.is_symbol()) { - return new IR_suifArraySymbol(ir_, op.symbol(), indirect); - } - else if (op.is_instr()) { - instruction *ins = op.instr(); - if (ins->opcode() == io_ldc) { - immed value = static_cast<in_ldc *>(ins)->value(); - if (value.is_symbol()) { - sym_node *the_sym = value.symbol(); - if (the_sym->is_var()) - return new IR_suifArraySymbol(ir_, static_cast<var_sym *>(the_sym), indirect); - else - break; - } - else - break; - } - else if (ins->opcode() == io_cvt) { - operand op = static_cast<in_rrr *>(ins)->src_op(); - if (op.is_symbol()) { - return new IR_suifArraySymbol(ir_, op.symbol(), indirect); - } - else if (op.is_instr()) { - instruction *ins = op.instr(); - if (ins->opcode() == io_lod) { - operand op = static_cast<in_rrr *>(ins)->src_op(); - if (op.is_symbol()) { - return new IR_suifArraySymbol(ir_, op.symbol(), indirect); - } - else if (op.is_instr()) { - instruction *ins = op.instr(); - if (ins->opcode() == io_array) { - current = static_cast<in_array *>(ins); - continue; - } - else if (ins->opcode() == io_add) { - operand op1 = ins->src_op(0); - operand op2 = ins->src_op(1); - if (!op1.is_symbol() || !op2.is_immed()) - throw ir_error("can't recognize array reference format"); - immed im = op2.immediate(); - if (!im.is_integer()) - throw ir_error("can't recognize array reference format"); - return new IR_suifArraySymbol(ir_, op1.symbol(), indirect, im.integer()); - } - else - break; - } - else - break; - } - else - break; - } - else - break; - } - else { - while (ins->opcode() == io_lod) { - operand op = ins->src_op(0); - if (op.is_instr()) - ins = op.instr(); - else if (op.is_symbol()) - return new IR_suifArraySymbol(ir_, op.symbol(), indirect); - else - break; - } - break; - } - } - else - break; - } - - fprintf(stderr, "Warning: null array symbol found, dependence graph bloated!\n"); - - return new IR_suifArraySymbol(ir_, NULL); -} - - -bool IR_suifArrayRef::operator==(const IR_Ref &that) const { - if (typeid(*this) != typeid(that)) - return false; - - const IR_suifArrayRef *l_that = static_cast<const IR_suifArrayRef *>(&that); - - return this->ia_ == l_that ->ia_; -} - - -omega::CG_outputRepr *IR_suifArrayRef::convert() { - omega::CG_suifRepr *result = new omega::CG_suifRepr(operand(this->ia_->clone())); - delete this; - return result; -} - - -IR_Ref *IR_suifArrayRef::clone() const { - return new IR_suifArrayRef(ir_, ia_); -} - - - -// ---------------------------------------------------------------------------- -// Class: IR_suifLoop -// ---------------------------------------------------------------------------- - -IR_ScalarSymbol *IR_suifLoop::index() const { - var_sym *vs = tf_->index(); - return new IR_suifScalarSymbol(ir_, vs); -} - -omega::CG_outputRepr *IR_suifLoop::lower_bound() const { - tree_node_list *tnl = tf_->lb_list(); - tree_node_list_iter iter(tnl); - if (iter.is_empty()) - return new omega::CG_suifRepr(operand()); - tree_node *tn = iter.step(); - if (!iter.is_empty()) - throw ir_error("cannot handle lower bound"); - if (tn->kind() != TREE_INSTR) - throw ir_error("cannot handle lower bound"); - instruction *ins = static_cast<tree_instr *>(tn)->instr(); - return new omega::CG_suifRepr(operand(ins)); -} - -omega::CG_outputRepr *IR_suifLoop::upper_bound() const { - tree_node_list *tnl = tf_->ub_list(); - tree_node_list_iter iter(tnl); - if (iter.is_empty()) - return new omega::CG_suifRepr(operand()); - tree_node *tn = iter.step(); - if (!iter.is_empty()) - throw ir_error("cannot handle lower bound"); - if (tn->kind() != TREE_INSTR) - throw ir_error("cannot handle lower bound"); - instruction *ins = static_cast<tree_instr *>(tn)->instr(); - return new omega::CG_suifRepr(operand(ins)); -} - -IR_CONDITION_TYPE IR_suifLoop::stop_cond() const { - if (tf_->test() == FOR_SLT || tf_->test() == FOR_ULT) - return IR_COND_LT; - else if (tf_->test() == FOR_SLTE || tf_->test() == FOR_ULTE) - return IR_COND_LE; - else if (tf_->test() == FOR_SGT || tf_->test() == FOR_UGT) - return IR_COND_GT; - else if (tf_->test() == FOR_SGTE || tf_->test() == FOR_UGTE) - return IR_COND_GE; - else - throw ir_error("loop stop condition unsupported"); -} - -IR_Block *IR_suifLoop::body() const { - tree_node_list *tnl = tf_->body(); - return new IR_suifBlock(ir_, tnl); -} - -int IR_suifLoop::step_size() const { - operand op = tf_->step_op(); - if (!op.is_null()) { - if (op.is_immed()) { - immed im = op.immediate(); - if (im.is_integer()) - return im.integer(); - else - throw ir_error("cannot handle non-integer stride"); - } - else - throw ir_error("cannot handle non-constant stride"); - } - else - return 1; -} - - -IR_Block *IR_suifLoop::convert() { - const IR_Code *ir = ir_; - tree_node_list *tnl = tf_->parent(); - tree_node_list_e *start, *end; - start = end = tf_->list_e(); - delete this; - return new IR_suifBlock(ir, tnl, start, end); -} - - -IR_Control *IR_suifLoop::clone() const { - return new IR_suifLoop(ir_, tf_); -} - -// ---------------------------------------------------------------------------- -// Class: IR_suifBlock -// ---------------------------------------------------------------------------- - -omega::CG_outputRepr *IR_suifBlock::extract() const { - tree_node_list *tnl = new tree_node_list; - tree_node_list_iter iter(tnl_); - while (!iter.is_empty()) { - tree_node *tn = iter.peek(); - if (tn->list_e() == start_) - break; - tn = iter.step(); - } - - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - tnl->append(tn->clone()); - if (tn->list_e() == end_) - break; - } - - return new omega::CG_suifRepr(tnl); -} - -IR_Control *IR_suifBlock::clone() const { - return new IR_suifBlock(ir_, tnl_, start_, end_); -} - - -// ---------------------------------------------------------------------------- -// Class: IR_suifIf -// ---------------------------------------------------------------------------- -omega::CG_outputRepr *IR_suifIf::condition() const { - tree_node_list *tnl = ti_->header(); - tree_node_list_iter iter(tnl); - if (iter.is_empty()) - throw ir_error("unrecognized if structure"); - tree_node *tn = iter.step(); - if (!iter.is_empty()) - throw ir_error("unrecognized if structure"); - if (!tn->is_instr()) - throw ir_error("unrecognized if structure"); - instruction *ins = static_cast<tree_instr *>(tn)->instr(); - if (!ins->opcode() == io_bfalse) - throw ir_error("unrecognized if structure"); - operand op = ins->src_op(0); - return new omega::CG_suifRepr(op); -} - -IR_Block *IR_suifIf::then_body() const { - tree_node_list *tnl = ti_->then_part(); - if (tnl == NULL) - return NULL; - tree_node_list_iter iter(tnl); - if (iter.is_empty()) - return NULL; - - return new IR_suifBlock(ir_, tnl); -} - -IR_Block *IR_suifIf::else_body() const { - tree_node_list *tnl = ti_->else_part(); - if (tnl == NULL) - return NULL; - tree_node_list_iter iter(tnl); - if (iter.is_empty()) - return NULL; - - return new IR_suifBlock(ir_, tnl); -} - - -IR_Block *IR_suifIf::convert() { - const IR_Code *ir = ir_; - tree_node_list *tnl = ti_->parent(); - tree_node_list_e *start, *end; - start = end = ti_->list_e(); - delete this; - return new IR_suifBlock(ir, tnl, start, end); -} - - -IR_Control *IR_suifIf::clone() const { - return new IR_suifIf(ir_, ti_); -} - - -// ---------------------------------------------------------------------------- -// Class: IR_suifCode_Global_Init -// ---------------------------------------------------------------------------- - -IR_suifCode_Global_Init *IR_suifCode_Global_Init::pinstance = NULL; - - -IR_suifCode_Global_Init *IR_suifCode_Global_Init::Instance () { - if (pinstance == NULL) - pinstance = new IR_suifCode_Global_Init; - return pinstance; -} - - -IR_suifCode_Global_Init::IR_suifCode_Global_Init() { - LIBRARY(useful, init_useful, exit_useful); - LIBRARY(annotes, init_annotes, exit_annotes); - - int argc = 1; - char *argv[1]; - argv[0] = "chill"; - init_suif(argc, argv); -} - - -// ---------------------------------------------------------------------------- -// Class: IR_suifCode_Global_Cleanup -// ---------------------------------------------------------------------------- - -IR_suifCode_Global_Cleanup::~IR_suifCode_Global_Cleanup() { - delete IR_suifCode_Global_Init::Instance(); - exit_suif1(); -} - - -namespace { - IR_suifCode_Global_Cleanup suifcode_global_cleanup_instance; -} - -// ---------------------------------------------------------------------------- -// Class: IR_suifCode -// ---------------------------------------------------------------------------- - -IR_suifCode::IR_suifCode(const char *filename, int proc_num): IR_Code() { - IR_suifCode_Global_Init::Instance(); - - std::string new_filename(filename); - int pos = new_filename.find_last_of('.'); - new_filename = new_filename.substr(0, pos) + ".lxf"; - fileset->add_file(const_cast<char *>(filename), const_cast<char *>(new_filename.c_str())); - fileset->reset_iter(); - fse_ = fileset->next_file(); - fse_->reset_proc_iter(); - - int cur_proc = 0; - while ((psym_ = fse_->next_proc()) && cur_proc < proc_num) - ++cur_proc; - if (cur_proc != proc_num) { - throw ir_error("procedure number cannot be found"); - } - - if (psym_->src_lang() == src_fortran) - is_fortran_ = true; - else - is_fortran_ = false; - - if (!psym_->is_in_memory()) - psym_->read_proc(TRUE, is_fortran_); - push_clue(psym_->block()); - - symtab_ = psym_->block()->proc_syms(); - ocg_ = new omega::CG_suifBuilder(symtab_); -} - - -IR_suifCode::~IR_suifCode() { - tree_node_list *tnl = psym_->block()->body(); - - if (init_code_ != NULL) - tnl->insert_before(static_cast<omega::CG_suifRepr *>(init_code_)->GetCode(), tnl->head()); - if (cleanup_code_ != NULL) - tnl->insert_after(static_cast<omega::CG_suifRepr *>(cleanup_code_)->GetCode(), tnl->tail()); - - pop_clue(psym_->block()); - if (!psym_->is_written()) - psym_->write_proc(fse_); - psym_->flush_proc(); -} - - -IR_ScalarSymbol *IR_suifCode::CreateScalarSymbol(const IR_Symbol *sym, int) { - if (typeid(*sym) == typeid(IR_suifScalarSymbol)) { - type_node *tn = static_cast<const IR_suifScalarSymbol *>(sym)->vs_->type(); - while (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - var_sym *vs = symtab_->new_unique_var(tn); - return new IR_suifScalarSymbol(this, vs); - } - else if (typeid(*sym) == typeid(IR_suifArraySymbol)) { - type_node *tn = static_cast<const IR_suifArraySymbol *>(sym)->vs_->type(); - while (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - while (tn->is_array() || tn->is_ptr()) { - if (tn->is_array()) - tn = static_cast<array_type *>(tn)->elem_type(); - else if (tn->is_ptr()) - tn = static_cast<ptr_type *>(tn)->ref_type(); - } - while (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - var_sym *vs = symtab_->new_unique_var(tn); - return new IR_suifScalarSymbol(this, vs); - } - else - throw std::bad_typeid(); -} - - -IR_ArraySymbol *IR_suifCode::CreateArraySymbol(const IR_Symbol *sym, std::vector<omega::CG_outputRepr *> &size, int) { - type_node *tn; - - if (typeid(*sym) == typeid(IR_suifScalarSymbol)) { - tn = static_cast<const IR_suifScalarSymbol *>(sym)->vs_->type(); - } - else if (typeid(*sym) == typeid(IR_suifArraySymbol)) { - tn = static_cast<const IR_suifArraySymbol *>(sym)->vs_->type(); - if (tn->is_modifier()) - tn = static_cast<modifier_type *>(tn)->base(); - while (tn->is_array() || tn->is_ptr()) { - if (tn->is_array()) - tn = static_cast<array_type *>(tn)->elem_type(); - else if (tn->is_ptr()) - tn = static_cast<ptr_type *>(tn)->ref_type(); - } - } - else - throw std::bad_typeid(); - - if (is_fortran_) - for (int i = 0; i < size.size(); i++) { - var_sym *temporary = symtab_->new_unique_var(type_s32); - init_code_ = ocg_->StmtListAppend(init_code_, ocg_->CreateAssignment(0, new omega::CG_suifRepr(operand(temporary)), size[i])); - - tn = new array_type(tn, array_bound(1), array_bound(temporary)); - symtab_->add_type(tn); - } - else - for (int i = size.size()-1; i >= 0; i--) { - var_sym *temporary = symtab_->new_unique_var(type_s32); - init_code_ = ocg_->StmtListAppend(init_code_, ocg_->CreateAssignment(0, new omega::CG_suifRepr(operand(temporary)), size[i])); - - tn = new array_type(tn, array_bound(1), array_bound(temporary)); - symtab_->add_type(tn); - } - - static int suif_array_counter = 1; - std::string s = std::string("_P") + omega::to_string(suif_array_counter++); - var_sym *vs = new var_sym(tn, const_cast<char *>(s.c_str())); - vs->add_to_table(symtab_); - - return new IR_suifArraySymbol(this, vs); -} - - -IR_ScalarRef *IR_suifCode::CreateScalarRef(const IR_ScalarSymbol *sym) { - return new IR_suifScalarRef(this, static_cast<const IR_suifScalarSymbol *>(sym)->vs_); -} - - -IR_ArrayRef *IR_suifCode::CreateArrayRef(const IR_ArraySymbol *sym, std::vector<omega::CG_outputRepr *> &index) { - if (sym->n_dim() != index.size()) - throw std::invalid_argument("incorrect array symbol dimensionality"); - - const IR_suifArraySymbol *l_sym = static_cast<const IR_suifArraySymbol *>(sym); - - var_sym *vs = l_sym->vs_; - type_node *tn1 = vs->type(); - if (tn1->is_modifier()) - tn1 = static_cast<modifier_type *>(tn1)->base(); - - type_node *tn2 = tn1; - while (tn2->is_array() || tn2->is_ptr()) { - if (tn2->is_array()) - tn2 = static_cast<array_type *>(tn2)->elem_type(); - else if (tn2->is_ptr()) - tn2 = static_cast<ptr_type *>(tn2)->ref_type(); - } - - instruction *base_ins; - if (tn1->is_ptr()) { - base_symtab *cur_symtab; - - cur_symtab = symtab_; - type_node *found_array_tn = NULL; - while (cur_symtab != NULL) { - type_node_list_iter iter(cur_symtab->types()); - while (!iter.is_empty()) { - type_node *tn = iter.step(); - if (!tn->is_array()) - continue; - if (static_cast<array_type *>(tn)->elem_type() == static_cast<ptr_type *>(tn1)->ref_type()) { - array_bound b = static_cast<array_type *>(tn)->upper_bound(); - if (b.is_unknown()) { - found_array_tn = tn; - break; - } - } - } - if (found_array_tn == NULL) - cur_symtab = cur_symtab->parent(); - else - break; - } - - cur_symtab = symtab_; - type_node *found_ptr_array_tn = NULL; - while (cur_symtab != NULL) { - type_node_list_iter iter(cur_symtab->types()); - while (!iter.is_empty()) { - type_node *tn = iter.step(); - if (!tn->is_ptr()) - continue; - if (static_cast<ptr_type *>(tn)->ref_type() == found_array_tn) { - found_ptr_array_tn = tn; - break; - } - } - if (found_ptr_array_tn == NULL) - cur_symtab = cur_symtab->parent(); - else - break; - } - - if (found_ptr_array_tn == NULL) - throw ir_error("can't find the type for the to-be-created array"); - base_ins = new in_rrr(io_cvt, found_ptr_array_tn, operand(), operand(vs)); - } - else { - base_ins = new in_ldc(tn1->ptr_to(), operand(), immed(vs)); - } - - in_array *ia = new in_array(tn2->ptr_to(), operand(), operand(base_ins), tn2->size(), l_sym->n_dim()); - - for (int i = 0; i < index.size(); i++) { - int t; - if (is_fortran_) - t = index.size() - i - 1; - else - t = i; - - omega::CG_suifRepr *bound = static_cast<omega::CG_suifRepr *>(l_sym->size(t)); - ia->set_bound(t, bound->GetExpression()); - delete bound; - omega::CG_suifRepr *idx = static_cast<omega::CG_suifRepr *>(index[i]); - ia->set_index(t, idx->GetExpression()); - delete idx; - } - - return new IR_suifArrayRef(this, ia); -} - - -std::vector<IR_ArrayRef *> IR_suifCode::FindArrayRef(const omega::CG_outputRepr *repr) const { - std::vector<IR_ArrayRef *> arrays; - - tree_node_list *tnl = static_cast<const omega::CG_suifRepr *>(repr)->GetCode(); - if (tnl != NULL) { - tree_node_list_iter iter(tnl); - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - switch (tn->kind()) { - case TREE_FOR: { - tree_for *tnf = static_cast<tree_for *>(tn); - omega::CG_suifRepr *r = new omega::CG_suifRepr(tnf->body()); - std::vector<IR_ArrayRef *> a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - break; - } - case TREE_IF: { - tree_if *tni = static_cast<tree_if *>(tn); - omega::CG_suifRepr *r = new omega::CG_suifRepr(tni->header()); - std::vector<IR_ArrayRef *> a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - r = new omega::CG_suifRepr(tni->then_part()); - a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - r = new omega::CG_suifRepr(tni->else_part()); - a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - break; - } - case TREE_BLOCK: { - omega::CG_suifRepr *r = new omega::CG_suifRepr(static_cast<tree_block *>(tn)->body()); - std::vector<IR_ArrayRef *> a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - break; - } - case TREE_INSTR: { - omega::CG_suifRepr *r = new omega::CG_suifRepr(operand(static_cast<tree_instr *>(tn)->instr())); - std::vector<IR_ArrayRef *> a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - break; - } - default: - throw ir_error("control structure not supported"); - } - } - } - else { - operand op = static_cast<const omega::CG_suifRepr *>(repr)->GetExpression(); - if (op.is_instr()) { - instruction *ins = op.instr(); - switch (ins->opcode()) { - case io_array: { - IR_suifArrayRef *ref = new IR_suifArrayRef(this, static_cast<in_array *>(ins)); - for (int i = 0; i < ref->n_dim(); i++) { - omega::CG_suifRepr *r = new omega::CG_suifRepr(find_array_index(ref->ia_, ref->n_dim(), i, is_fortran_)); - std::vector<IR_ArrayRef *> a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - } - arrays.push_back(ref); - break; - } - case io_str: - case io_memcpy: { - omega::CG_suifRepr *r1 = new omega::CG_suifRepr(ins->src_op(1)); - std::vector<IR_ArrayRef *> a1 = FindArrayRef(r1); - delete r1; - std::copy(a1.begin(), a1.end(), back_inserter(arrays)); - omega::CG_suifRepr *r2 = new omega::CG_suifRepr(ins->src_op(0)); - std::vector<IR_ArrayRef *> a2 = FindArrayRef(r2); - delete r2; - std::copy(a2.begin(), a2.end(), back_inserter(arrays)); - break; - } - default: - for (int i = 0; i < ins->num_srcs(); i++) { - omega::CG_suifRepr *r = new omega::CG_suifRepr(ins->src_op(i)); - std::vector<IR_ArrayRef *> a = FindArrayRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(arrays)); - } - } - } - } - - return arrays; -} - - -std::vector<IR_ScalarRef *> IR_suifCode::FindScalarRef(const omega::CG_outputRepr *repr) const { - std::vector<IR_ScalarRef *> scalars; - - tree_node_list *tnl = static_cast<const omega::CG_suifRepr *>(repr)->GetCode(); - if (tnl != NULL) { - tree_node_list_iter iter(tnl); - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - switch (tn->kind()) { - case TREE_FOR: { - tree_for *tnf = static_cast<tree_for *>(tn); - omega::CG_suifRepr *r = new omega::CG_suifRepr(tnf->body()); - std::vector<IR_ScalarRef *> a = FindScalarRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - break; - } - case TREE_IF: { - tree_if *tni = static_cast<tree_if *>(tn); - omega::CG_suifRepr *r = new omega::CG_suifRepr(tni->header()); - std::vector<IR_ScalarRef *> a = FindScalarRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - r = new omega::CG_suifRepr(tni->then_part()); - a = FindScalarRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - r = new omega::CG_suifRepr(tni->else_part()); - a = FindScalarRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - break; - } - case TREE_BLOCK: { - omega::CG_suifRepr *r = new omega::CG_suifRepr(static_cast<tree_block *>(tn)->body()); - std::vector<IR_ScalarRef *> a = FindScalarRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - break; - } - case TREE_INSTR: { - omega::CG_suifRepr *r = new omega::CG_suifRepr(operand(static_cast<tree_instr *>(tn)->instr())); - std::vector<IR_ScalarRef *> a = FindScalarRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - break; - } - default: - throw ir_error("control structure not supported"); - } - } - } - else { - operand op = static_cast<const omega::CG_suifRepr *>(repr)->GetExpression(); - if (op.is_instr()) { - instruction *ins = op.instr(); - for (int i = 0; i < ins->num_srcs(); i++) { - operand op = ins->src_op(i); - if (op.is_symbol()) - scalars.push_back(new IR_suifScalarRef(this, ins, i)); - else if (op.is_instr()) { - omega::CG_suifRepr *r = new omega::CG_suifRepr(op); - std::vector<IR_ScalarRef *> a = FindScalarRef(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - } - } - - operand op = ins->dst_op(); - if (op.is_symbol()) - scalars.push_back(new IR_suifScalarRef(this, ins, -1)); - } - else if (op.is_symbol()) - scalars.push_back(new IR_suifScalarRef(this, op.symbol())); - } - - return scalars; -} - - -std::vector<IR_Control *> IR_suifCode::FindOneLevelControlStructure(const IR_Block *block) const { - std::vector<IR_Control *> controls; - - IR_suifBlock *l_block = static_cast<IR_suifBlock *>(const_cast<IR_Block *>(block)); - tree_node_list_iter iter(l_block->tnl_); - while(!iter.is_empty()) { - tree_node *tn = iter.peek(); - if (tn->list_e() == l_block->start_) - break; - iter.step(); - } - tree_node_list_e *start = NULL; - tree_node_list_e *prev = NULL; - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - if (tn->kind() == TREE_FOR) { - if (start != NULL) { - controls.push_back(new IR_suifBlock(this, l_block->tnl_, start, prev)); - start = NULL; - } - controls.push_back(new IR_suifLoop(this, static_cast<tree_for *>(tn))); - } - else if (tn->kind() == TREE_IF) { - if (start != NULL) { - controls.push_back(new IR_suifBlock(this, l_block->tnl_, start, prev)); - start = NULL; - } - controls.push_back(new IR_suifIf(this, static_cast<tree_if *>(tn))); - } - else if (start == NULL && !is_null_statement(tn)) { - start = tn->list_e(); - } - prev = tn->list_e(); - if (prev == l_block->end_) - break; - } - - if (start != NULL && start != l_block->start_) - controls.push_back(new IR_suifBlock(this, l_block->tnl_, start, prev)); - - return controls; -} - - -IR_Block *IR_suifCode::MergeNeighboringControlStructures(const std::vector<IR_Control *> &controls) const { - if (controls.size() == 0) - return NULL; - - tree_node_list *tnl = NULL; - tree_node_list_e *start, *end; - for (int i = 0; i < controls.size(); i++) { - switch (controls[i]->type()) { - case IR_CONTROL_LOOP: { - tree_for *tf = static_cast<IR_suifLoop *>(controls[i])->tf_; - if (tnl == NULL) { - tnl = tf->parent(); - start = end = tf->list_e(); - } - else { - if (tnl != tf->parent()) - throw ir_error("controls to merge not at the same level"); - end = tf->list_e(); - } - break; - } - case IR_CONTROL_BLOCK: { - if (tnl == NULL) { - tnl = static_cast<IR_suifBlock *>(controls[0])->tnl_; - start = static_cast<IR_suifBlock *>(controls[0])->start_; - end = static_cast<IR_suifBlock *>(controls[0])->end_; - } - else { - if (tnl != static_cast<IR_suifBlock *>(controls[0])->tnl_) - throw ir_error("controls to merge not at the same level"); - end = static_cast<IR_suifBlock *>(controls[0])->end_; - } - break; - } - default: - throw ir_error("unrecognized control to merge"); - } - } - - return new IR_suifBlock(controls[0]->ir_, tnl, start, end); -} - - -IR_Block *IR_suifCode::GetCode() const { - return new IR_suifBlock(this, psym_->block()->body()); -} - - -void IR_suifCode::ReplaceCode(IR_Control *old, omega::CG_outputRepr *repr) { - tree_node_list *tnl = static_cast<omega::CG_suifRepr *>(repr)->GetCode(); - - switch (old->type()) { - case IR_CONTROL_LOOP: { - tree_for *tf_old = static_cast<IR_suifLoop *>(old)->tf_; - tree_node_list *tnl_old = tf_old->parent(); - - tnl_old->insert_before(tnl, tf_old->list_e()); - tnl_old->remove(tf_old->list_e()); - delete tf_old; - - break; - } - case IR_CONTROL_BLOCK: { - IR_suifBlock *sb = static_cast<IR_suifBlock *>(old); - tree_node_list_iter iter(sb->tnl_); - bool need_deleting = false; - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - tree_node_list_e *pos = tn->list_e(); - if (pos == sb->start_) { - sb->tnl_->insert_before(tnl, pos); - need_deleting = true; - } - if (need_deleting) { - sb->tnl_->remove(pos); - delete tn; - } - if (pos == sb->end_) - break; - } - - break; - } - default: - throw ir_error("control structure to be replaced not supported"); - } - - delete old; - delete repr; -} - - -void IR_suifCode::ReplaceExpression(IR_Ref *old, omega::CG_outputRepr *repr) { - operand op = static_cast<omega::CG_suifRepr *>(repr)->GetExpression(); - - if (typeid(*old) == typeid(IR_suifArrayRef)) { - in_array *ia_orig = static_cast<IR_suifArrayRef *>(old)->ia_; - - if (op.is_instr()) { - instruction *ia_repl = op.instr(); - if (ia_repl->opcode() == io_array) { - if (ia_orig->elem_type()->is_struct()) { - static_cast<in_array *>(ia_repl)->set_offset(ia_orig->offset()); - struct_type *tn = static_cast<struct_type *>(ia_orig->elem_type()); - int left; - type_node *field_tn = tn->field_type(tn->find_field_by_offset(ia_orig->offset(), left)); - static_cast<in_array *>(ia_repl)->set_result_type(field_tn->ptr_to()); - } - replace_instruction(ia_orig, ia_repl); - delete ia_orig; - } - else { - instruction *parent_instr = ia_orig->dst_op().instr(); - if (parent_instr->opcode() == io_str) { - throw ir_error("replace left hand arrary reference not supported yet"); - } - else if (parent_instr->opcode() == io_lod) { - instruction *instr = parent_instr->dst_op().instr(); - if (instr->dst_op() == operand(parent_instr)) { - parent_instr->remove(); - instr->set_dst(op); - } - else { - for (int i = 0; i < instr->num_srcs(); i++) - if (instr->src_op(i) == operand(parent_instr)) { - parent_instr->remove(); - instr->set_src_op(i, op); - break; - } - } - - delete parent_instr; - } - else - throw ir_error("array reference to be replaced does not appear in any instruction"); - } - } - else if (op.is_symbol()) { - var_sym *vs = op.symbol(); - instruction *parent_instr = ia_orig->dst_op().instr(); - if (parent_instr->opcode() == io_str) { - tree_node *tn = parent_instr->parent(); - operand op = parent_instr->src_op(1).clone(); - instruction *new_instr = new in_rrr(io_cpy, vs->type(), operand(vs), op); - tree_node_list *tnl = tn->parent(); - tnl->insert_before(new tree_instr(new_instr), tn->list_e()); - tnl->remove(tn->list_e()); - - delete tn; - } - else if (parent_instr->opcode() == io_lod) { - instruction *instr = parent_instr->dst_op().instr(); - if (instr->dst_op() == operand(parent_instr)) { - parent_instr->remove(); - instr->set_dst(operand(vs)); - } - else { - for (int i = 0; i < instr->num_srcs(); i++) - if (instr->src_op(i) == operand(parent_instr)) { - parent_instr->remove(); - instr->set_src_op(i, operand(vs)); - break; - } - } - - delete parent_instr; - } - else - throw ir_error("array reference to be replaced does not appear in any instruction"); - } - else - throw ir_error("can't handle replacement expression"); - } - else - throw ir_error("replacing a scalar variable not implemented"); - - delete old; - delete repr; -} - - - -IR_OPERATION_TYPE IR_suifCode::QueryExpOperation(const omega::CG_outputRepr *repr) const { - operand op = static_cast<const omega::CG_suifRepr *>(repr)->GetExpression(); - - if (op.is_immed()) - return IR_OP_CONSTANT; - else if (op.is_symbol()) - return IR_OP_VARIABLE; - else if (op.is_instr()) { - instruction *ins = op.instr(); - switch (ins->opcode()) { - case io_cpy: - return IR_OP_ASSIGNMENT; - case io_add: - return IR_OP_PLUS; - case io_sub: - return IR_OP_MINUS; - case io_mul: - return IR_OP_MULTIPLY; - case io_div: - return IR_OP_DIVIDE; - case io_neg: - return IR_OP_NEGATIVE; - case io_min: - return IR_OP_MIN; - case io_max: - return IR_OP_MAX; - case io_cvt: - return IR_OP_POSITIVE; - default: - return IR_OP_UNKNOWN; - } - } - else if (op.is_null()) - return IR_OP_NULL; - else - return IR_OP_UNKNOWN; -} - - -IR_CONDITION_TYPE IR_suifCode::QueryBooleanExpOperation(const omega::CG_outputRepr *repr) const { - operand op = static_cast<const omega::CG_suifRepr *>(repr)->GetExpression(); - if (op.is_instr()) { - instruction *ins = op.instr(); - switch (ins->opcode()) { - case io_seq: - return IR_COND_EQ; - case io_sne: - return IR_COND_NE; - case io_sl: - return IR_COND_LT; - case io_sle: - return IR_COND_LE; - default: - return IR_COND_UNKNOWN; - } - } - else - return IR_COND_UNKNOWN; -} - - -std::vector<omega::CG_outputRepr *> IR_suifCode::QueryExpOperand(const omega::CG_outputRepr *repr) const { - std::vector<omega::CG_outputRepr *> v; - - operand op = static_cast<const omega::CG_suifRepr *>(repr)->GetExpression(); - if (op.is_immed() || op.is_symbol()) { - omega::CG_suifRepr *repr = new omega::CG_suifRepr(op); - v.push_back(repr); - } - else if (op.is_instr()) { - instruction *ins = op.instr(); - omega::CG_suifRepr *repr; - operand op1, op2; - switch (ins->opcode()) { - case io_cpy: - case io_neg: - case io_cvt: - op1 = ins->src_op(0); - repr = new omega::CG_suifRepr(op1); - v.push_back(repr); - break; - case io_add: - case io_sub: - case io_mul: - case io_div: - case io_min: - case io_max: - op1 = ins->src_op(0); - repr = new omega::CG_suifRepr(op1); - v.push_back(repr); - op2 = ins->src_op(1); - repr = new omega::CG_suifRepr(op2); - v.push_back(repr); - break; - case io_seq: - case io_sne: - case io_sl: - case io_sle: - op1 = ins->src_op(0); - repr = new omega::CG_suifRepr(op1); - v.push_back(repr); - op2 = ins->src_op(1); - repr = new omega::CG_suifRepr(op2); - v.push_back(repr); - break; - default: - throw ir_error("operation not supported"); - } - } - else - throw ir_error("operand type not supported"); - - return v; -} - - -// IR_Constant *IR_suifCode::QueryExpConstant(const CG_outputRepr *repr) const { -// CG_suifRepr *l_repr = static_cast<CG_suifRepr *>(const_cast<CG_outputRepr *>(repr)); - -// operand op = l_repr->GetExpression(); -// if (op.is_immed()) { -// immed im = op.immediate(); - -// switch (im.kind()) { -// case im_int: -// return new IR_suifConstant(this, static_cast<coef_t>(im.integer())); -// case im_extended_int: -// return new IR_suifConstant(this, static_cast<coef_t>(im.long_int())); -// case im_float: -// return new IR_suifConstant(this, im.flt()); -// default: -// assert(-1); -// } -// } -// else -// assert(-1); -// } - - -// IR_ScalarRef *IR_suifCode::QueryExpVariable(const CG_outputRepr *repr) const { -// CG_suifRepr *l_repr = static_cast<CG_suifRepr *>(const_cast<CG_outputRepr *>(repr)); - -// operand op = l_repr->GetExpression(); -// if (op.is_symbol()) -// return new IR_suifScalarRef(this, op.symbol()); -// else -// assert(-1); -// } - - -IR_Ref *IR_suifCode::Repr2Ref(const omega::CG_outputRepr *repr) const { - operand op = static_cast<const omega::CG_suifRepr *>(repr)->GetExpression(); - if (op.is_immed()) { - immed im = op.immediate(); - - switch (im.kind()) { - case im_int: - return new IR_suifConstantRef(this, static_cast<omega::coef_t>(im.integer())); - case im_extended_int: - return new IR_suifConstantRef(this, static_cast<omega::coef_t>(im.long_int())); - case im_float: - return new IR_suifConstantRef(this, im.flt()); - default: - throw ir_error("immediate value not integer or floatint point"); - } - } - else if (op.is_symbol()) - return new IR_suifScalarRef(this, op.symbol()); - else - throw ir_error("unrecognized reference type"); -} diff --git a/ir_suif.hh b/ir_suif.hh deleted file mode 100644 index 9c3d82d..0000000 --- a/ir_suif.hh +++ /dev/null @@ -1,212 +0,0 @@ -#ifndef IR_SUIF_HH -#define IR_SUIF_HH - -#include <map> -#include <code_gen/CG_suifRepr.h> -#include <code_gen/CG_suifBuilder.h> -#include "ir_code.hh" - -struct IR_suifScalarSymbol: public IR_ScalarSymbol { - var_sym *vs_; - - IR_suifScalarSymbol(const IR_Code *ir, var_sym *vs) { - ir_ = ir; - vs_ = vs; - } - std::string name() const; - int size() const; - bool operator==(const IR_Symbol &that) const; - IR_Symbol *clone() const; -}; - - -struct IR_suifArraySymbol: public IR_ArraySymbol { - var_sym *vs_; - int indirect_; - int offset_; - - IR_suifArraySymbol(const IR_Code *ir, var_sym *vs, int indirect = 0, int offset = 0) { - ir_ = ir; - vs_ = vs; - indirect_ = indirect; - offset_ = offset; - } - std::string name() const; - int elem_size() const; - int n_dim() const; - omega::CG_outputRepr *size(int dim) const; - bool operator==(const IR_Symbol &that) const; - IR_ARRAY_LAYOUT_TYPE layout_type() const; - IR_Symbol *clone() const; -}; - - -struct IR_suifConstantRef: public IR_ConstantRef { - union { - omega::coef_t i_; - double f_; - }; - - IR_suifConstantRef(const IR_Code *ir, omega::coef_t i) { - ir_ = ir; - type_ = IR_CONSTANT_INT; - i_ = i; - } - IR_suifConstantRef(const IR_Code *ir, double f) { - ir_ = ir; - type_ = IR_CONSTANT_FLOAT; - f_ = f; - } - omega::coef_t integer() const {assert(is_integer()); return i_;} - bool operator==(const IR_Ref &that) const; - omega::CG_outputRepr *convert(); - IR_Ref *clone() const; -}; - - -struct IR_suifScalarRef: public IR_ScalarRef { - instruction *ins_pos_; - int op_pos_; // -1 means destination operand, otherwise source operand - var_sym *vs_; - - IR_suifScalarRef(const IR_Code *ir, var_sym *sym) { - ir_ = ir; - ins_pos_ = NULL; - vs_ = sym; - } - IR_suifScalarRef(const IR_Code *ir, instruction *ins, int pos) { - ir_ = ir; - ins_pos_ = ins; - op_pos_ = pos; - operand op; - if (pos == -1) - op = ins->dst_op(); - else - op = ins->src_op(pos); - assert(op.is_symbol()); - vs_ = op.symbol(); - } - bool is_write() const; - IR_ScalarSymbol *symbol() const; - bool operator==(const IR_Ref &that) const; - omega::CG_outputRepr *convert(); - IR_Ref *clone() const; -}; - - -struct IR_suifArrayRef: public IR_ArrayRef { - in_array *ia_; - - IR_suifArrayRef(const IR_Code *ir, in_array *ia) { - ir_ = ir; - ia_ = ia; - } - bool is_write() const; - omega::CG_outputRepr *index(int dim) const; - IR_ArraySymbol *symbol() const; - bool operator==(const IR_Ref &that) const; - omega::CG_outputRepr *convert(); - IR_Ref *clone() const; -}; - - -struct IR_suifLoop: public IR_Loop { - tree_for *tf_; - - IR_suifLoop(const IR_Code *ir, tree_for *tf) { ir_ = ir; tf_ = tf; } - ~IR_suifLoop() {} - IR_ScalarSymbol *index() const; - omega::CG_outputRepr *lower_bound() const; - omega::CG_outputRepr *upper_bound() const; - IR_CONDITION_TYPE stop_cond() const; - IR_Block *body() const; - int step_size() const; - IR_Block *convert(); - IR_Control *clone() const; -}; - - -struct IR_suifBlock: public IR_Block { - tree_node_list *tnl_; - tree_node_list_e *start_, *end_; - - IR_suifBlock(const IR_Code *ir, tree_node_list *tnl, tree_node_list_e *start, tree_node_list_e *end) { - ir_ = ir; tnl_ = tnl; start_ = start; end_ = end; - } - IR_suifBlock(const IR_Code *ir, tree_node_list *tnl) { - ir_ = ir; tnl_ = tnl; start_ = tnl_->head(); end_ = tnl_->tail(); - } - ~IR_suifBlock() {} - omega::CG_outputRepr *extract() const; - IR_Control *clone() const; -}; - - -struct IR_suifIf: public IR_If { - tree_if *ti_; - - IR_suifIf(const IR_Code *ir, tree_if *ti) { ir_ = ir; ti_ = ti; } - ~IR_suifIf() {} - omega::CG_outputRepr *condition() const; - IR_Block *then_body() const; - IR_Block *else_body() const; - IR_Block *convert(); - IR_Control *clone() const; -}; - - -// singleton class for global suif initialization -class IR_suifCode_Global_Init { -private: - static IR_suifCode_Global_Init *pinstance; -protected: - IR_suifCode_Global_Init(); - IR_suifCode_Global_Init(const IR_suifCode_Global_Init &); - IR_suifCode_Global_Init & operator= (const IR_suifCode_Global_Init &); -public: - static IR_suifCode_Global_Init *Instance(); - ~IR_suifCode_Global_Init() {} -}; - -// singleton class for global suif cleanup -class IR_suifCode_Global_Cleanup { -public: - IR_suifCode_Global_Cleanup() {} - ~IR_suifCode_Global_Cleanup(); -}; - -class IR_suifCode: public IR_Code{ -protected: - file_set_entry *fse_; - proc_sym *psym_; - proc_symtab *symtab_; - bool is_fortran_; - -public: - IR_suifCode(const char *filename, int proc_num); - ~IR_suifCode(); - - IR_ScalarSymbol *CreateScalarSymbol(const IR_Symbol *sym, int memory_type = 0); - IR_ArraySymbol *CreateArraySymbol(const IR_Symbol *sym, std::vector<omega::CG_outputRepr *> &size, int memory_type = 0); - IR_ScalarRef *CreateScalarRef(const IR_ScalarSymbol *sym); - IR_ArrayRef *CreateArrayRef(const IR_ArraySymbol *sym, std::vector<omega::CG_outputRepr *> &index); - int ArrayIndexStartAt() {if (is_fortran_) return 1; else return 0;} - - std::vector<IR_ArrayRef *> FindArrayRef(const omega::CG_outputRepr *repr) const; - std::vector<IR_ScalarRef *> FindScalarRef(const omega::CG_outputRepr *repr) const; - std::vector<IR_Control *> FindOneLevelControlStructure(const IR_Block *block) const; - IR_Block *MergeNeighboringControlStructures(const std::vector<IR_Control *> &controls) const; - IR_Block *GetCode() const; - void ReplaceCode(IR_Control *old, omega::CG_outputRepr *repr); - void ReplaceExpression(IR_Ref *old, omega::CG_outputRepr *repr); - - IR_OPERATION_TYPE QueryExpOperation(const omega::CG_outputRepr *repr) const; - IR_CONDITION_TYPE QueryBooleanExpOperation(const omega::CG_outputRepr *repr) const; - std::vector<omega::CG_outputRepr *> QueryExpOperand(const omega::CG_outputRepr *repr) const; - IR_Ref *Repr2Ref(const omega::CG_outputRepr *) const; - - friend class IR_suifArraySymbol; - friend class IR_suifArrayRef; -}; - -#endif diff --git a/ir_suif_utils.cc b/ir_suif_utils.cc deleted file mode 100644 index f4e4edf..0000000 --- a/ir_suif_utils.cc +++ /dev/null @@ -1,477 +0,0 @@ -/***************************************************************************** - Copyright (C) 2008 University of Southern California - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - SUIF interface utilities. - - Notes: - - Update history: - 01/2006 created by Chun Chen -*****************************************************************************/ - -#include <suif1.h> -#include <useful.h> -#include <vector> -#include <algorithm> -#include <code_gen/CG_suifRepr.h> -#include "ir_suif_utils.hh" - -// ---------------------------------------------------------------------------- -// Mandatory SUIF stuff -// ---------------------------------------------------------------------------- -char *prog_ver_string = "1.3.0.5-gccfix"; -char *prog_who_string = "automatically generated from chill"; -char *prog_suif_string = "suif"; - -// static file_set_entry *fse = NULL; -// static proc_sym *psym = NULL; - -// class SUIF_IR; - -// SUIF_IR *ir = NULL; - -// SUIF_IR::SUIF_IR(char *filename, int proc_num) { -// // LIBRARY(ipmath, init_ipmath, exit_ipmath); -// LIBRARY(useful, init_useful, exit_useful); -// LIBRARY(annotes, init_annotes, exit_annotes); - -// int argc = 3; -// char *argv[3]; -// argv[0] = "loop_xform"; -// argv[1] = strdup(filename); -// argv[2] = strdup(filename); -// char *pos = strrchr(argv[2], '.'); -// if (pos == NULL) -// strcat(argv[2], ".lxf"); -// else { -// *pos = '\0'; -// strcat(argv[2], ".lxf"); -// } -// init_suif(argc, argv); - -// fileset->add_file(argv[1], argv[2]); -// fileset->reset_iter(); -// _fse = fileset->next_file(); -// _fse->reset_proc_iter(); -// int cur_proc = 0; -// while ((_psym = _fse->next_proc()) && cur_proc < proc_num) -// ++cur_proc; -// if (cur_proc != proc_num) { -// fprintf(stderr, "procedure number %d couldn't be found\n", proc_num); -// exit(1); -// } -// if (!_psym->is_in_memory()) -// _psym->read_proc(TRUE, _psym->src_lang() == src_fortran); - -// push_clue(_psym->block()); -// } - - -// SUIF_IR::~SUIF_IR() { -// pop_clue(_psym->block()); -// if (!_psym->is_written()) -// _psym->write_proc(_fse); -// _psym->flush_proc(); - -// exit_suif1(); -// } - - -// tree_for *SUIF_IR::get_loop(int loop_num) { -// std::vector<tree_for *> loops = find_loops(_psym->block()->body()); -// if (loop_num >= loops.size()) { -// fprintf(stderr, "loop number %d couldn't be found\n", loop_num); -// exit(1); -// } -// return loops[loop_num]; -// } - - -// void SUIF_IR::commit(Loop *lp, int loop_num) { -// if (lp == NULL) -// return; - -// if (lp->init_code != NULL) { -// tree_node_list *init_tnl = static_cast<CG_suifRepr *>(lp->init_code->clone())->GetCode(); -// tree_node_list_iter iter(lp->symtab->block()->body()); -// iter.step(); -// lp->symtab->block()->body()->insert_before(init_tnl, iter.cur_elem()); -// } - -// tree_node_list *code = lp->getCode(); -// std::vector<tree_for *> loops = find_loops(_psym->block()->body()); -// tree_node_list *tnl = loops[loop_num]->parent(); -// tnl->insert_before(code, loops[loop_num]->list_e()); -// tnl->remove(loops[loop_num]->list_e()); -// } - - -// extern void start_suif(int &argc, char *argv[]) { -// // LIBRARY(ipmath, init_ipmath, exit_ipmath); -// LIBRARY(useful, init_useful, exit_useful); -// LIBRARY(annotes, init_annotes, exit_annotes); - -// init_suif(argc, argv); -// } - -// tree_for *init_loop(char *filename, int proc_num, int loop_num) { -// // LIBRARY(ipmath, init_ipmath, exit_ipmath); -// LIBRARY(useful, init_useful, exit_useful); -// LIBRARY(annotes, init_annotes, exit_annotes); - -// int argc = 3; -// char *argv[3]; -// argv[0] = "loop_xform"; -// argv[1] = filename; -// argv[2] = strdup(filename); -// char *pos = strrchr(argv[2], '.'); -// if (pos == NULL) -// strcat(argv[2], ".lxf"); -// else { -// *pos = '\0'; -// strcat(argv[2], ".lxf"); -// } -// printf("%s %s %s\n", argv[0], argv[1], argv[2]); -// init_suif(argc, argv); - -// fileset->add_file(argv[1], argv[2]); -// fileset->reset_iter(); -// fse = fileset->next_file(); -// fse->reset_proc_iter(); -// int cur_proc = 0; -// while ((psym = fse->next_proc()) && cur_proc < proc_num) -// ++cur_proc; -// if (cur_proc != proc_num) { -// fprintf(stderr, "procedure number %d couldn't be found\n", proc_num); -// exit(1); -// } - -// if (!psym->is_in_memory()) -// psym->read_proc(TRUE, psym->src_lang() == src_fortran); - -// push_clue(psym->block()); -// std::vector<tree_for *> loops = find_loops(psym->block()->body()); -// if (loop_num >= loops.size()) -// return NULL; -// return loops[loop_num]; -// } - - -// void finalize_loop() { - -// printf("finalize %d\n", fse); -// pop_clue(psym->block()); -// if (!psym->is_written()) -// psym->write_proc(fse); -// psym->flush_proc(); -// } - - - -// // ---------------------------------------------------------------------------- -// // Class: CG_suifArray -// // ---------------------------------------------------------------------------- -// CG_suifArray::CG_suifArray(in_array *ia_): ia(ia_) { -// var_sym *vs = get_sym_of_array(ia); -// name = String(vs->name()); - -// for (int i = 0; i < ia->dims(); i++) -// index.push_back(new CG_suifRepr(ia->index(i))); -// } - -// bool CG_suifArray::is_write() { -// return is_lhs(ia); -// } - - -// ---------------------------------------------------------------------------- -// Find array index in various situations. -// ---------------------------------------------------------------------------- -operand find_array_index(in_array *ia, int n, int dim, bool is_fortran) { - if (!is_fortran) - dim = n - dim - 1; - int level = n - dim -1; - - in_array *current = ia; - - while (true) { - int n = current->dims(); - if (level < n) { - return current->index(level); - } - else { - level = level - n; - operand op = current->base_op(); - assert(op.is_instr()); - instruction *ins = op.instr(); - if (ins->opcode() != io_cvt) - return operand(); - operand op2 = static_cast<in_rrr *>(ins)->src_op(); - assert(op2.is_instr()); - instruction *ins2 = op2.instr(); - assert(ins2->opcode() == io_lod); - operand op3 = static_cast<in_rrr *>(ins2)->src_op(); - assert(op3.is_instr()); - instruction *ins3 = op3.instr(); - assert(ins3->opcode() == io_array); - current = static_cast<in_array *>(ins3); - } - } -} - - - - -// ---------------------------------------------------------------------------- -// Check if a tree_node is doing nothing -// ---------------------------------------------------------------------------- -bool is_null_statement(tree_node *tn) { - if (tn->kind() != TREE_INSTR) - return false; - - instruction *ins = static_cast<tree_instr*>(tn)->instr(); - - if (ins->opcode() == io_mrk || ins->opcode() == io_nop) - return true; - else - return false; -} - -// ---------------------------------------------------------------------------- -// Miscellaneous loop functions -// ---------------------------------------------------------------------------- -std::vector<tree_for *> find_deepest_loops(tree_node *tn) { - if (tn->kind() == TREE_FOR) { - std::vector<tree_for *> loops; - - tree_for *tnf = static_cast<tree_for *>(tn); - loops.insert(loops.end(), tnf); - std::vector<tree_for *> t = find_deepest_loops(tnf->body()); - std::copy(t.begin(), t.end(), std::back_inserter(loops)); - - return loops; - } - else if (tn->kind() == TREE_BLOCK) { - tree_block *tnb = static_cast<tree_block *>(tn); - return find_deepest_loops(tnb->body()); - } - else - return std::vector<tree_for *>(); -} - -std::vector<tree_for *> find_deepest_loops(tree_node_list *tnl) { - std::vector<tree_for *> loops; - - tree_node_list_iter iter(tnl); - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - - std::vector<tree_for *> t = find_deepest_loops(tn); - - if (t.size() > loops.size()) - loops = t; - } - - return loops; -} - -std::vector<tree_for *> find_loops(tree_node_list *tnl) { - std::vector<tree_for *> result; - - tree_node_list_iter iter(tnl); - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - if (tn->kind() == TREE_FOR) - result.push_back(static_cast<tree_for *>(tn)); - } - - return result; -} - - -std::vector<tree_for *> find_outer_loops(tree_node *tn) { - std::vector<tree_for *> loops; - - while(tn) { - if(tn->kind() == TREE_FOR) - loops.insert(loops.begin(),static_cast<tree_for*>(tn)); - tn = (tn->parent())?tn->parent()->parent():NULL; - } - - return loops; -} - -std::vector<tree_for *> find_common_loops(tree_node *tn1, tree_node *tn2) { - std::vector<tree_for *> loops1 = find_outer_loops(tn1); - std::vector<tree_for *> loops2 = find_outer_loops(tn2); - - std::vector<tree_for *> loops; - - for (unsigned i = 0; i < std::min(loops1.size(), loops2.size()); i++) { - if (loops1[i] == loops2[i]) - loops.insert(loops.end(), loops1[i]); - else - break; - } - - return loops; -} - - -//----------------------------------------------------------------------------- -// Determine the lexical order between two instructions. -//----------------------------------------------------------------------------- -LexicalOrderType lexical_order(tree_node *tn1, tree_node *tn2) { - if (tn1 == tn2) - return LEX_MATCH; - - std::vector<tree_node *> tnv1; - std::vector<tree_node_list *> tnlv1; - while (tn1 != NULL && tn1->parent() != NULL) { - tnv1.insert(tnv1.begin(), tn1); - tnlv1.insert(tnlv1.begin(), tn1->parent()); - tn1 = tn1->parent()->parent(); - } - - std::vector<tree_node *> tnv2; - std::vector<tree_node_list *> tnlv2; - while (tn2 != NULL && tn2->parent() != NULL) { - tnv2.insert(tnv2.begin(), tn2); - tnlv2.insert(tnlv2.begin(), tn2->parent()); - tn2 = tn2->parent()->parent(); - } - - for (int i = 0; i < std::min(tnlv1.size(), tnlv2.size()); i++) { - if (tnlv1[i] == tnlv2[i] && tnv1[i] != tnv2[i]) { - tree_node_list_iter iter(tnlv1[i]); - - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - - if (tn == tnv1[i]) - return LEX_BEFORE; - else if (tn == tnv2[i]) - return LEX_AFTER; - } - - break; - } - } - - return LEX_UNKNOWN; -} - - - -//----------------------------------------------------------------------------- -// Get the list of array instructions -//----------------------------------------------------------------------------- -std::vector<in_array *> find_arrays(instruction *ins) { - std::vector<in_array *> arrays; - if (ins->opcode() == io_array) { - arrays.insert(arrays.end(), static_cast<in_array *>(ins)); - } - else { - for (int i = 0; i < ins->num_srcs(); i++) { - operand op(ins->src_op(i)); - if (op.is_instr()) { - std::vector<in_array *> t = find_arrays(op.instr()); - std::copy(t.begin(), t.end(), back_inserter(arrays)); - } - } - } - return arrays; -} - -std::vector<in_array *> find_arrays(tree_node_list *tnl) { - std::vector<in_array *> arrays, t; - tree_node_list_iter iter(tnl); - - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - - if (tn->kind() == TREE_FOR) { - tree_for *tnf = static_cast<tree_for *>(tn); - - t = find_arrays(tnf->body()); - std::copy(t.begin(), t.end(), back_inserter(arrays)); - } - else if (tn->kind() == TREE_IF) { - tree_if *tni = static_cast<tree_if *>(tn); - - t = find_arrays(tni->header()); - std::copy(t.begin(), t.end(), back_inserter(arrays)); - t = find_arrays(tni->then_part()); - std::copy(t.begin(), t.end(), back_inserter(arrays)); - t = find_arrays(tni->else_part()); - std::copy(t.begin(), t.end(), back_inserter(arrays)); - } - else if (tn->kind() == TREE_BLOCK) { - t = find_arrays(static_cast<tree_block *>(tn)->body()); - std::copy(t.begin(), t.end(), back_inserter(arrays)); - } - else if (tn->kind() == TREE_INSTR) { - t = find_arrays(static_cast<tree_instr *>(tn)->instr()); - std::copy(t.begin(), t.end(), back_inserter(arrays)); - } - } - - return arrays; -} - -// std::vector<CG_suifArray *> find_array_access(instruction *ins) { -// std::vector<CG_suifArray *> arrays; - -// if (ins->opcode() == io_array) { -// arrays.push_back(new CG_suifArray(static_cast<in_array *>(ins))); -// } -// else { -// for (int i = 0; i < ins->num_srcs(); i++) { -// operand op(ins->src_op(i)); -// if (op.is_instr()) { -// std::vector<CG_suifArray *> t = find_array_access(op.instr()); -// std::copy(t.begin(), t.end(), back_inserter(arrays)); -// } -// } -// } -// return arrays; -// } - -// std::vector<CG_suifArray *> find_array_access(tree_node_list *tnl) { -// std::vector<CG_suifArray *> arrays, t; -// tree_node_list_iter iter(tnl); - -// while (!iter.is_empty()) { -// tree_node *tn = iter.step(); - -// if (tn->kind() == TREE_FOR) { -// tree_for *tnf = static_cast<tree_for *>(tn); - -// t = find_array_access(tnf->body()); -// std::copy(t.begin(), t.end(), back_inserter(arrays)); -// } -// else if (tn->kind() == TREE_IF) { -// tree_if *tni = static_cast<tree_if *>(tn); - -// t = find_array_access(tni->header()); -// std::copy(t.begin(), t.end(), back_inserter(arrays)); -// t = find_array_access(tni->then_part()); -// std::copy(t.begin(), t.end(), back_inserter(arrays)); -// t = find_array_access(tni->else_part()); -// std::copy(t.begin(), t.end(), back_inserter(arrays)); -// } -// else if (tn->kind() == TREE_BLOCK) { -// t = find_array_access(static_cast<tree_block *>(tn)->body()); -// std::copy(t.begin(), t.end(), back_inserter(arrays)); -// } -// else if (tn->kind() == TREE_INSTR) { -// t = find_array_access(static_cast<tree_instr *>(tn)->instr()); -// std::copy(t.begin(), t.end(), back_inserter(arrays)); -// } -// } - -// return arrays; -// } diff --git a/ir_suif_utils.hh b/ir_suif_utils.hh deleted file mode 100644 index 55d5ce7..0000000 --- a/ir_suif_utils.hh +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef IR_SUIF_UTILS_HH -#define IR_SUIF_UTILS_HH -#include <vector> -#include <suif1.h> -// #include "cctools.hh" -#include "omegatools.hh" -// #include "loop.hh" - -// c++ stuff: - -// template <class T> const T& min(const T &a, const T &b) { -// if ( a < b) -// return a; -// else -// return b; -// } - -// template <class T> T abs(const T &v) { -// if (v < static_cast<T>(0)) -// return -v; -// else -// return v; -// } - -// class CG_suifArray: public CG_inputArray { -// protected: -// in_array *ia; -// public: -// CG_suifArray(in_array *ia_); -// virtual bool is_write(); -// }; - - -// class SUIF_IR { -// public: -// file_set_entry *_fse; -// proc_sym *_psym; -// SUIF_IR(char *filename, int proc_num); -// ~SUIF_IR(); - -// tree_for *get_loop(int loop_num); -// void commit(Loop *lp, int loop_num); -// }; - -// extern SUIF_IR *ir; - -// suif stuff: - -// tree_for *init_loop(char *filename, int proc_num, int loop_num); -// void finalize_loop(); - - -operand find_array_index(in_array *ia, int n, int dim, bool is_fortran); -bool is_null_statement(tree_node *tn); -std::vector<tree_for *> find_deepest_loops(tree_node *tn); -std::vector<tree_for *> find_deepest_loops(tree_node_list *tnl); -std::vector<tree_for *> find_loops(tree_node_list *tnl); -std::vector<tree_for*> find_outer_loops(tree_node *tn); -std::vector<tree_for *> find_common_loops(tree_node *tn1, tree_node *tn2); -LexicalOrderType lexical_order(tree_node *tn1, tree_node *tn2); -std::vector<in_array *> find_arrays(instruction *ins); -std::vector<in_array *> find_arrays(tree_node_list *tnl); - -//protonu--adding a few functions used it cuda-chil -//these are defined in ir_cuda_suif_uitls.cc -tree_node_list* loop_body_at_level(tree_node_list* tnl, int level); -tree_node_list* loop_body_at_level(tree_for* loop, int level); -tree_node_list* swap_node_for_node_list(tree_node* tn, tree_node_list* new_tnl); -// std::vector<CG_suifArray *> find_arrays_access(instruction *ins); -// std::vector<CG_suifArray *> find_arrays_access(tree_node_list *tnl); - -#endif @@ -53,6 +53,7 @@ bool Loop::isInitialized() const { bool Loop::init_loop(std::vector<ir_tree_node *> &ir_tree, std::vector<ir_tree_node *> &ir_stmt) { + ir_stmt = extract_ir_stmts(ir_tree); stmt_nesting_level_.resize(ir_stmt.size()); std::vector<int> stmt_nesting_level(ir_stmt.size()); diff --git a/loop_backup.cc b/loop_backup.cc deleted file mode 100644 index b361ed4..0000000 --- a/loop_backup.cc +++ /dev/null @@ -1,3311 +0,0 @@ -/***************************************************************************** - Copyright (C) 2008 University of Southern California - Copyright (C) 2009-2010 University of Utah - All Rights Reserved. - - Purpose: - Core loop transformation functionality. - - Notes: - "level" (starting from 1) means loop level and it corresponds to "dim" - (starting from 0) in transformed iteration space [c_1,l_1,c_2,l_2,...., - c_n,l_n,c_(n+1)], e.g., l_2 is loop level 2 in generated code, dim 3 - in transformed iteration space, and variable 4 in Omega relation. - All c's are constant numbers only and they will not show up as actual loops. - Formula: - dim = 2*level - 1 - var = dim + 1 - - History: - 10/2005 Created by Chun Chen. - 09/2009 Expand tile functionality, -chun - 10/2009 Initialize unfusible loop nest without bailing out, -chun -*****************************************************************************/ - -#include <limits.h> -#include <math.h> -#include <code_gen/code_gen.h> -#include <code_gen/CG_outputBuilder.h> -#include <code_gen/output_repr.h> -#include <iostream> -#include <map> -#include "loop.hh" -#include "omegatools.hh" -#include "irtools.hh" -#include "chill_error.hh" - -using namespace omega; - -const std::string Loop::tmp_loop_var_name_prefix = std::string("_t"); -const std::string Loop::overflow_var_name_prefix = std::string("over"); - -//----------------------------------------------------------------------------- -// Class Loop -//----------------------------------------------------------------------------- - -bool Loop::init_loop(std::vector<ir_tree_node *> &ir_tree, std::vector<ir_tree_node *> &ir_stmt) { - ir_stmt = extract_ir_stmts(ir_tree); - std::vector<int> stmt_nesting_level(ir_stmt.size()); - for (int i = 0; i < ir_stmt.size(); i++) { - ir_stmt[i]->payload = i; - int t = 0; - ir_tree_node *itn = ir_stmt[i]; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) - t++; - } - stmt_nesting_level[i] = t; - } - - stmt = std::vector<Statement>(ir_stmt.size()); - int n_dim = -1; - int max_loc; - std::vector<std::string> index; - for (int i = 0; i < ir_stmt.size(); i++) { - int max_nesting_level = -1; - int loc; - for (int j = 0; j < ir_stmt.size(); j++) - if (stmt_nesting_level[j] > max_nesting_level) { - max_nesting_level = stmt_nesting_level[j]; - loc = j; - } - - // most deeply nested statement acting as a reference point - if (n_dim == -1) { - n_dim = max_nesting_level; - max_loc = loc; - - index = std::vector<std::string>(n_dim); - - ir_tree_node *itn = ir_stmt[loc]; - int cur_dim = n_dim-1; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) { - index[cur_dim] = static_cast<IR_Loop *>(itn->content)->index()->name(); - itn->payload = cur_dim--; - } - } - } - - // align loops by names, temporary solution - ir_tree_node *itn = ir_stmt[loc]; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP && itn->payload == -1) { - std::string name = static_cast<IR_Loop *>(itn->content)->index()->name(); - for (int j = 0; j < n_dim; j++) - if (index[j] == name) { - itn->payload = j; - break; - } - if (itn->payload == -1) - throw loop_error("no complex alignment yet"); - } - } - - // set relation variable names - Relation r(n_dim); - F_And *f_root = r.add_and(); - itn = ir_stmt[loc]; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) - r.name_set_var(itn->payload+1, static_cast<IR_Loop *>(itn->content)->index()->name()); - } - - // extract information from loop/if structures - std::vector<bool> processed(n_dim, false); - Tuple<std::string> vars_to_be_reversed; - itn = ir_stmt[loc]; - while (itn->parent != NULL) { - itn = itn->parent; - - switch (itn->content->type()) { - case IR_CONTROL_LOOP: { - IR_Loop *lp = static_cast<IR_Loop *>(itn->content); - Variable_ID v = r.set_var(itn->payload+1); - int c; - - try { - c = lp->step_size(); - if (c > 0) { - CG_outputRepr *lb = lp->lower_bound(); - exp2formula(ir, r, f_root, freevar, lb, v, 's', IR_COND_GE, true); - CG_outputRepr *ub = lp->upper_bound(); - IR_CONDITION_TYPE cond = lp->stop_cond(); - if (cond == IR_COND_LT || cond == IR_COND_LE) - exp2formula(ir, r, f_root, freevar, ub, v, 's', cond, true); - else - throw ir_error("loop condition not supported"); - - } - else if (c < 0) { - CG_outputBuilder *ocg = ir->builder(); - CG_outputRepr *lb = lp->lower_bound(); - lb = ocg->CreateMinus(NULL, lb); - exp2formula(ir, r, f_root, freevar, lb, v, 's', IR_COND_GE, true); - CG_outputRepr *ub = lp->upper_bound(); - ub = ocg->CreateMinus(NULL, ub); - IR_CONDITION_TYPE cond = lp->stop_cond(); - if (cond == IR_COND_GE) - exp2formula(ir, r, f_root, freevar, ub, v, 's', IR_COND_LE, true); - else if (cond == IR_COND_GT) - exp2formula(ir, r, f_root, freevar, ub, v, 's', IR_COND_LT, true); - else - throw ir_error("loop condition not supported"); - - vars_to_be_reversed.append(lp->index()->name()); - } - else - throw ir_error("loop step size zero"); - } - catch (const ir_error &e) { - for (int i = 0; i < itn->children.size(); i++) - delete itn->children[i]; - itn->children = std::vector<ir_tree_node *>(); - itn->content = itn->content->convert(); - return false; - } - - if (abs(c) != 1) { - F_Exists *f_exists = f_root->add_exists(); - Variable_ID e = f_exists->declare(); - F_And *f_and = f_exists->add_and(); - Stride_Handle h = f_and->add_stride(abs(c)); - if (c > 0) - h.update_coef(e, 1); - else - h.update_coef(e, -1); - h.update_coef(v, -1); - CG_outputRepr *lb = lp->lower_bound(); - exp2formula(ir, r, f_and, freevar, lb, e, 's', IR_COND_EQ, true); - } - - processed[itn->payload] = true; - break; - } - case IR_CONTROL_IF: { - CG_outputRepr *cond = static_cast<IR_If *>(itn->content)->condition(); - try { - if (itn->payload % 2 == 1) - exp2constraint(ir, r, f_root, freevar, cond, true); - else { - F_Not *f_not = f_root->add_not(); - F_And *f_and = f_not->add_and(); - exp2constraint(ir, r, f_and, freevar, cond, true); - } - } - catch (const ir_error &e) { - std::vector<ir_tree_node *> *t; - if (itn->parent == NULL) - t = &ir_tree; - else - t = &(itn->parent->children); - int id = itn->payload; - int i = t->size() - 1; - while (i >= 0) { - if ((*t)[i] == itn) { - for (int j = 0; j < itn->children.size(); j++) - delete itn->children[j]; - itn->children = std::vector<ir_tree_node *>(); - itn->content = itn->content->convert(); - } - else if ((*t)[i]->payload >> 1 == id >> 1) { - delete (*t)[i]; - t->erase(t->begin()+i); - } - i--; - } - return false; - } - - break; - } - default: - for (int i = 0; i < itn->children.size(); i++) - delete itn->children[i]; - itn->children = std::vector<ir_tree_node *>(); - itn->content = itn->content->convert(); - return false; - } - } - - // add information for missing loops - for (int j = 0; j < n_dim; j++) - if (!processed[j]) { - ir_tree_node *itn = ir_stmt[max_loc]; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP && itn->payload == j) - break; - } - - Variable_ID v = r.set_var(j+1); - if (loc < max_loc) { - CG_outputRepr *lb = static_cast<IR_Loop *>(itn->content)->lower_bound(); - exp2formula(ir, r, f_root, freevar, lb, v, 's', IR_COND_EQ, true); - } - else { // loc > max_loc - CG_outputRepr *ub = static_cast<IR_Loop *>(itn->content)->upper_bound(); - exp2formula(ir, r, f_root, freevar, ub, v, 's', IR_COND_EQ, true); - } - } - - r.setup_names(); - r.simplify(); - - // insert the statement - CG_outputBuilder *ocg = ir->builder(); - Tuple<CG_outputRepr *> reverse_expr; - for (int j = 1; j <= vars_to_be_reversed.size(); j++) { - CG_outputRepr *repl = ocg->CreateIdent(vars_to_be_reversed[j]); - repl = ocg->CreateMinus(NULL, repl); - reverse_expr.append(repl); - } - CG_outputRepr *code = static_cast<IR_Block *>(ir_stmt[loc]->content)->extract(); - code = ocg->CreatePlaceHolder(0, code, reverse_expr, vars_to_be_reversed); - stmt[loc].code = code; - stmt[loc].IS = r; - stmt[loc].loop_level = std::vector<LoopLevel>(n_dim); - for (int i = 0; i < n_dim; i++) { - stmt[loc].loop_level[i].type = LoopLevelOriginal; - stmt[loc].loop_level[i].payload = i; - stmt[loc].loop_level[i].parallel_level = 0; - } - - stmt_nesting_level[loc] = -1; - } - - return true; -} - - - -Loop::Loop(const IR_Control *control) { - ir = const_cast<IR_Code *>(control->ir_); - init_code = NULL; - cleanup_code = NULL; - tmp_loop_var_name_counter = 1; - overflow_var_name_counter = 1; - known = Relation::True(0); - - std::vector<ir_tree_node *> ir_tree = build_ir_tree(control->clone(), NULL); - std::vector<ir_tree_node *> ir_stmt; - - while (!init_loop(ir_tree, ir_stmt)) {} - - // init the dependence graph - for (int i = 0; i < stmt.size(); i++) - dep.insert(); - - for (int i = 0; i < stmt.size(); i++) - for (int j = i; j < stmt.size(); j++) { - std::pair<std::vector<DependenceVector>, std::vector<DependenceVector> > dv = test_data_dependences(ir, stmt[i].code, stmt[i].IS, stmt[j].code, stmt[j].IS, freevar); - - for (int k = 0; k < dv.first.size(); k++) - if (is_dependence_valid(ir_stmt[i], ir_stmt[j], dv.first[k], true)) - dep.connect(i, j, dv.first[k]); - else - dep.connect(j, i, dv.first[k].reverse()); - - for (int k = 0; k < dv.second.size(); k++) - if (is_dependence_valid(ir_stmt[j], ir_stmt[i], dv.second[k], false)) - dep.connect(j, i, dv.second[k]); - else - dep.connect(i, j, dv.second[k].reverse()); - } - - // cleanup the IR tree - for (int i = 0; i < ir_tree.size(); i++) - delete ir_tree[i]; - - // init dumb transformation relations e.g. [i, j] -> [ 0, i, 0, j, 0] - for (int i = 0; i < stmt.size(); i++) { - int n = stmt[i].IS.n_set(); - stmt[i].xform = Relation(n, 2*n+1); - F_And *f_root = stmt[i].xform.add_and(); - - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(stmt[i].xform.output_var(2*j), 1); - h.update_coef(stmt[i].xform.input_var(j), -1); - } - - for (int j = 1; j <= 2*n+1; j+=2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(stmt[i].xform.output_var(j), 1); - } - stmt[i].xform.simplify(); - } - - if (stmt.size() != 0) - num_dep_dim = stmt[0].IS.n_set(); - else - num_dep_dim = 0; -} - - -Loop::~Loop() { - for (int i = 0; i < stmt.size(); i++) - if (stmt[i].code != NULL) { - stmt[i].code->clear(); - delete stmt[i].code; - } - if (init_code != NULL) { - init_code->clear(); - delete init_code; - } - if (cleanup_code != NULL) { - cleanup_code->clear(); - delete cleanup_code; - } -} - - -int Loop::get_dep_dim_of(int stmt_num, int level) const { - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invaid statement " + to_string(stmt_num)); - - if (level < 1 || level > stmt[stmt_num].loop_level.size()) - return -1; - - int trip_count = 0; - while (true) { - switch (stmt[stmt_num].loop_level[level-1].type) { - case LoopLevelOriginal: - return stmt[stmt_num].loop_level[level-1].payload; - case LoopLevelTile: - level = stmt[stmt_num].loop_level[level-1].payload; - if (level < 1) - return -1; - if (level > stmt[stmt_num].loop_level.size()) - throw loop_error("incorrect loop level information for statement " + to_string(stmt_num)); - break; - default: - throw loop_error("unknown loop level information for statement " + to_string(stmt_num)); - } - trip_count++; - if (trip_count >= stmt[stmt_num].loop_level.size()) - throw loop_error("incorrect loop level information for statement " + to_string(stmt_num)); - } -} - - -int Loop::get_last_dep_dim_before(int stmt_num, int level) const { - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invaid statement " + to_string(stmt_num)); - - if (level < 1) - return -1; - if (level > stmt[stmt_num].loop_level.size()) - level = stmt[stmt_num].loop_level.size() + 1; - - for (int i = level-1; i >= 1; i--) - if (stmt[stmt_num].loop_level[i-1].type == LoopLevelOriginal) - return stmt[stmt_num].loop_level[i-1].payload; - - return -1; -} - - -void Loop::print_internal_loop_structure() const { - for (int i = 0; i < stmt.size(); i++) { - std::vector<int> lex = getLexicalOrder(i); - std::cout << "s" << i+1 << ": "; - for (int j = 0; j < stmt[i].loop_level.size(); j++) { - if (2*j < lex.size()) - std::cout << lex[2*j]; - switch (stmt[i].loop_level[j].type) { - case LoopLevelOriginal: - std::cout << "(dim:" << stmt[i].loop_level[j].payload << ")"; - break; - case LoopLevelTile: - std::cout << "(tile:" << stmt[i].loop_level[j].payload << ")"; - break; - default: - std::cout << "(unknown)"; - } - std::cout << ' '; - } - for (int j = 2*stmt[i].loop_level.size(); j < lex.size(); j+=2) { - std::cout << lex[j]; - if (j != lex.size()-1) - std::cout << ' '; - } - std::cout << std::endl; - } -} - - -CG_outputRepr *Loop::getCode(int effort) const { - const int m = stmt.size(); - if (m == 0) - return NULL; - const int n = stmt[0].xform.n_out(); - - Tuple<CG_outputRepr *> ni(m); - Tuple<Relation> IS(m); - Tuple<Relation> xform(m); - for (int i = 0; i < m; i++) { - ni[i+1] = stmt[i].code; - IS[i+1] = stmt[i].IS; - xform[i+1] = stmt[i].xform; - } - - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - CG_outputBuilder *ocg = ir->builder(); - CG_outputRepr *repr = MMGenerateCode(ocg, xform, IS, ni, known, effort); - - if (init_code != NULL) - repr = ocg->StmtListAppend(init_code->clone(), repr); - if (cleanup_code != NULL) - repr = ocg->StmtListAppend(repr, cleanup_code->clone()); - - return repr; -} - - -void Loop::printCode(int effort) const { - const int m = stmt.size(); - if (m == 0) - return; - const int n = stmt[0].xform.n_out(); - - Tuple<Relation> IS(m); - Tuple<Relation> xform(m); - for (int i = 0; i < m; i++) { - IS[i+1] = stmt[i].IS; - xform[i+1] = stmt[i].xform; - } - - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - std::cout << MMGenerateCode(xform, IS, known, effort); -} - - -Relation Loop::getNewIS(int stmt_num) const { - Relation result; - - if (stmt[stmt_num].xform.is_null()) { - Relation known = Extend_Set(copy(this->known), stmt[stmt_num].IS.n_set() - this->known.n_set()); - result = Intersection(copy(stmt[stmt_num].IS), known); - } - else { - Relation known = Extend_Set(copy(this->known), stmt[stmt_num].xform.n_out() - this->known.n_set()); - result = Intersection(Range(Restrict_Domain(copy(stmt[stmt_num].xform), copy(stmt[stmt_num].IS))), known); - } - - result.simplify(2, 4); - - return result; -} - -std::vector<Relation> Loop::getNewIS() const { - const int m = stmt.size(); - - std::vector<Relation> new_IS(m); - for (int i = 0; i < m; i++) - new_IS[i] = getNewIS(i); - - return new_IS; -} - - -void Loop::permute(const std::vector<int> &pi) { - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - - permute(active, pi); -} - - -void Loop::original() { - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - setLexicalOrder(0, active); -} - - -void Loop::permute(const std::set<int> &active, const std::vector<int> &pi) { - if (active.size() == 0 || pi.size() == 0) - return; - - // check for sanity of parameters - int level = pi[0]; - for (int i = 1; i < pi.size(); i++) - if (pi[i] < level) - level = pi[i]; - if (level < 1) - throw std::invalid_argument("invalid permuation"); - std::vector<int> reverse_pi(pi.size(), 0); - for (int i = 0; i < pi.size(); i++) - if (pi[i] >= level+pi.size()) - throw std::invalid_argument("invalid permutation"); - else - reverse_pi[pi[i]-level] = i+level; - for (int i = 0; i < reverse_pi.size(); i++) - if (reverse_pi[i] == 0) - throw std::invalid_argument("invalid permuation"); - int ref_stmt_num; - std::vector<int> lex; - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - if (*i < 0 || *i >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(*i)); - if (i == active.begin()) { - ref_stmt_num = *i; - lex = getLexicalOrder(*i); - } - else { - if (level+pi.size()-1 > stmt[*i].loop_level.size()) - throw std::invalid_argument("invalid permuation"); - std::vector<int> lex2 = getLexicalOrder(*i); - for (int j = 0; j < 2*level-3; j+=2) - if (lex[j] != lex2[j]) - throw std::invalid_argument("statements to permute must be in the same subloop"); - for (int j = 0; j < pi.size(); j++) - if (!(stmt[*i].loop_level[level+j-1].type == stmt[ref_stmt_num].loop_level[level+j-1].type && - stmt[*i].loop_level[level+j-1].payload == stmt[ref_stmt_num].loop_level[level+j-1].payload)) - throw std::invalid_argument("permuted loops must have the same loop level types"); - } - } - - // Update transformation relations - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - int n = stmt[*i].xform.n_out(); - Relation mapping(n, n); - F_And *f_root = mapping.add_and(); - for (int j = 1; j <= n; j+= 2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(j), 1); - h.update_coef(mapping.input_var(j), -1); - } - for (int j = 0; j < pi.size(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2*(level+j)), 1); - h.update_coef(mapping.input_var(2*pi[j]), -1); - } - for (int j = 1; j < level; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2*j), 1); - h.update_coef(mapping.input_var(2*j), -1); - } - for (int j = level+pi.size(); j <= stmt[*i].loop_level.size(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2*j), 1); - h.update_coef(mapping.input_var(2*j), -1); - } - - stmt[*i].xform = Composition(mapping, stmt[*i].xform); - stmt[*i].xform.simplify(); - } - - // get the permuation for dependence vectors - std::vector<int> t; - for (int i = 0; i < pi.size(); i++) - if (stmt[ref_stmt_num].loop_level[pi[i]-1].type == LoopLevelOriginal) - t.push_back(stmt[ref_stmt_num].loop_level[pi[i]-1].payload); - int max_dep_dim = -1; - int min_dep_dim = num_dep_dim; - for (int i = 0; i < t.size(); i++) { - if (t[i] > max_dep_dim) - max_dep_dim = t[i]; - if (t[i] < min_dep_dim) - min_dep_dim = t[i]; - } - if (min_dep_dim > max_dep_dim) - return; - if (max_dep_dim - min_dep_dim + 1 != t.size()) - throw loop_error("cannot update the dependence graph after permuation"); - std::vector<int> dep_pi(num_dep_dim); - for (int i = 0; i < min_dep_dim; i++) - dep_pi[i] = i; - for (int i = min_dep_dim; i <= max_dep_dim; i++) - dep_pi[i] = t[i-min_dep_dim]; - for (int i = max_dep_dim+1; i < num_dep_dim; i++) - dep_pi[i] = i; - - // update the dependence graph - DependenceGraph g; - for (int i = 0; i < dep.vertex.size(); i++) - g.insert(); - for (int i = 0; i < dep.vertex.size(); i++) - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); j++) { - if ((active.find(i) != active.end() && active.find(j->first) != active.end())) { - std::vector<DependenceVector> dv = j->second; - for (int k = 0; k < dv.size(); k++) { - switch (dv[k].type) { - case DEP_W2R: - case DEP_R2W: - case DEP_W2W: - case DEP_R2R: { - std::vector<coef_t> lbounds(num_dep_dim); - std::vector<coef_t> ubounds(num_dep_dim); - for (int d = 0; d < num_dep_dim; d++) { - lbounds[d] = dv[k].lbounds[dep_pi[d]]; - ubounds[d] = dv[k].ubounds[dep_pi[d]]; - } - dv[k].lbounds = lbounds; - dv[k].ubounds = ubounds; - break; - } - case DEP_CONTROL: { - break; - } - default: - throw loop_error("unknown dependence type"); - } - } - g.connect(i, j->first, dv); - } - else if (active.find(i) == active.end() && active.find(j->first) == active.end()) { - std::vector<DependenceVector> dv = j->second; - g.connect(i, j->first, dv); - } - else { - std::vector<DependenceVector> dv = j->second; - for (int k = 0; k < dv.size(); k++) - switch (dv[k].type) { - case DEP_W2R: - case DEP_R2W: - case DEP_W2W: - case DEP_R2R: { - for (int d = 0; d < num_dep_dim; d++) - if (dep_pi[d] != d) { - dv[k].lbounds[d] = -posInfinity; - dv[k].ubounds[d] = posInfinity; - } - break; - } - case DEP_CONTROL: - break; - default: - throw loop_error("unknown dependence type"); - } - g.connect(i, j->first, dv); - } - } - dep = g; - - // update loop level information - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - int cur_dep_dim = min_dep_dim; - std::vector<LoopLevel> new_loop_level(stmt[*i].loop_level.size()); - for (int j = 1; j <= stmt[*i].loop_level.size(); j++) - if (j >= level && j < level+pi.size()) { - switch (stmt[*i].loop_level[reverse_pi[j-level]-1].type) { - case LoopLevelOriginal: - new_loop_level[j-1].type = LoopLevelOriginal; - new_loop_level[j-1].payload = cur_dep_dim++; - new_loop_level[j-1].parallel_level = stmt[*i].loop_level[reverse_pi[j-level]-1].parallel_level; - break; - case LoopLevelTile: { - new_loop_level[j-1].type = LoopLevelTile; - int ref_level = stmt[*i].loop_level[reverse_pi[j-level]-1].payload; - if (ref_level >= level && ref_level < level+pi.size()) - new_loop_level[j-1].payload = reverse_pi[ref_level-level]; - else - new_loop_level[j-1].payload = ref_level; - new_loop_level[j-1].parallel_level = stmt[*i].loop_level[reverse_pi[j-level]-1].parallel_level; - break; - } - default: - throw loop_error("unknown loop level information for statement " + to_string(*i)); - } - } - else { - switch (stmt[*i].loop_level[j-1].type) { - case LoopLevelOriginal: - new_loop_level[j-1].type = LoopLevelOriginal; - new_loop_level[j-1].payload = stmt[*i].loop_level[j-1].payload; - new_loop_level[j-1].parallel_level = stmt[*i].loop_level[j-1].parallel_level; - break; - case LoopLevelTile: { - new_loop_level[j-1].type = LoopLevelTile; - int ref_level = stmt[*i].loop_level[j-1].payload; - if (ref_level >= level && ref_level < level+pi.size()) - new_loop_level[j-1].payload = reverse_pi[ref_level-level]; - else - new_loop_level[j-1].payload = ref_level; - new_loop_level[j-1].parallel_level = stmt[*i].loop_level[j-1].parallel_level; - break; - } - default: - throw loop_error("unknown loop level information for statement " + to_string(*i)); - } - } - stmt[*i].loop_level = new_loop_level; - } - - setLexicalOrder(2*level-2, active); -} - -std::set<int> Loop::split(int stmt_num, int level, const Relation &cond) { - // check for sanity of parameters - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - std::set<int> result; - int dim = 2*level-1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim-1); - - Relation cond2 = copy(cond); - cond2.simplify(); - cond2 = EQs_to_GEQs(cond2); - Conjunct *c = cond2.single_conjunct(); - int cur_lex = lex[dim-1]; - for (GEQ_Iterator gi(c->GEQs()); gi; gi++) { - int max_level = (*gi).max_tuple_pos(); - Relation single_cond(max_level); - single_cond.and_with_GEQ(*gi); - - // TODO: should decide where to place newly created statements with - // complementary split condition from dependence graph. - bool place_after; - if (max_level == 0) - place_after = true; - else if ((*gi).get_coef(cond2.set_var(max_level)) < 0) - place_after = true; - else - place_after = false; - - // make adjacent lexical number available for new statements - if (place_after) { - lex[dim-1] = cur_lex+1; - shiftLexicalOrder(lex, dim-1, 1); - } - else { - lex[dim-1] = cur_lex-1; - shiftLexicalOrder(lex, dim-1, -1); - } - - // original statements with split condition, - // new statements with complement of split condition - int old_num_stmt = stmt.size(); - std::map<int, int> what_stmt_num; - apply_xform(same_loop); - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - int n = stmt[*i].IS.n_set(); - Relation part1, part2; - if (max_level > n) { - part1 = copy(stmt[*i].IS); - part2 = Relation::False(0); - } - else { - part1 = Intersection(copy(stmt[*i].IS), Extend_Set(copy(single_cond), n-max_level)); - part2 = Intersection(copy(stmt[*i].IS), Extend_Set(Complement(copy(single_cond)), n-max_level)); - } - - stmt[*i].IS = part1; - - if (Intersection(copy(part2), Extend_Set(copy(this->known), n-this->known.n_set())).is_upper_bound_satisfiable()) { - Statement new_stmt; - new_stmt.code = stmt[*i].code->clone(); - new_stmt.IS = part2; - new_stmt.xform = copy(stmt[*i].xform); - if (place_after) - assign_const(new_stmt.xform, dim-1, cur_lex+1); - else - assign_const(new_stmt.xform, dim-1, cur_lex-1); - new_stmt.loop_level = stmt[*i].loop_level; - stmt.push_back(new_stmt); - dep.insert(); - what_stmt_num[*i] = stmt.size() - 1; - if (*i == stmt_num) - result.insert(stmt.size() - 1); - } - } - - // update dependence graph - int dep_dim = get_dep_dim_of(stmt_num, level); - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::pair<int, std::vector<DependenceVector> > > D; - - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); j++) { - if (same_loop.find(i) != same_loop.end()) { - if (same_loop.find(j->first) != same_loop.end()) { - if (what_stmt_num.find(i) != what_stmt_num.end() && what_stmt_num.find(j->first) != what_stmt_num.end()) - dep.connect(what_stmt_num[i], what_stmt_num[j->first], j->second); - if (place_after && what_stmt_num.find(j->first) != what_stmt_num.end()) { - std::vector<DependenceVector> dvs; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.is_data_dependence() && dep_dim != -1) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - dvs.push_back(dv); - } - if (dvs.size() > 0) - D.push_back(std::make_pair(what_stmt_num[j->first], dvs)); - } - else if (!place_after && what_stmt_num.find(i) != what_stmt_num.end()) { - std::vector<DependenceVector> dvs; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.is_data_dependence() && dep_dim != -1) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - dvs.push_back(dv); - } - if (dvs.size() > 0) - dep.connect(what_stmt_num[i], j->first, dvs); - - } - } - else { - if (what_stmt_num.find(i) != what_stmt_num.end()) - dep.connect(what_stmt_num[i], j->first, j->second); - } - } - else if (same_loop.find(j->first) != same_loop.end()) { - if (what_stmt_num.find(j->first) != what_stmt_num.end()) - D.push_back(std::make_pair(what_stmt_num[j->first], j->second)); - } - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, D[j].first, D[j].second); - } - } - - return result; -} - - - -void Loop::tile(int stmt_num, int level, int tile_size, int outer_level, TilingMethodType method, int alignment_offset, int alignment_multiple) { - // check for sanity of parameters - if (tile_size < 0) - throw std::invalid_argument("invalid tile size"); - if (alignment_multiple < 1 || alignment_offset < 0) - throw std::invalid_argument("invalid alignment for tile"); - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - if (level <= 0) - throw std::invalid_argument("invalid loop level " + to_string(level)); - if (level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("there is no loop level " + to_string(level) + " for statement " + to_string(stmt_num)); - if (outer_level <= 0 || outer_level > level) - throw std::invalid_argument("invalid tile controlling loop level " + to_string(outer_level)); - - int dim = 2*level-1; - int outer_dim = 2*outer_level-1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_tiled_loop = getStatements(lex, dim-1); - std::set<int> same_tile_controlling_loop = getStatements(lex, outer_dim-1); - - // special case for no tiling - if (tile_size == 0) { - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); i != same_tile_controlling_loop.end(); i++) { - Relation r(stmt[*i].xform.n_out(),stmt[*i].xform.n_out()+2); - F_And *f_root = r.add_and(); - for (int j = 1; j <= 2*outer_level-1; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j), -1); - } - EQ_Handle h1 = f_root->add_EQ(); - h1.update_coef(r.output_var(2*outer_level), 1); - EQ_Handle h2 = f_root->add_EQ(); - h2.update_coef(r.output_var(2*outer_level+1), 1); - for (int j = 2*outer_level; j <= stmt[*i].xform.n_out(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j+2), -1); - } - - stmt[*i].xform = Composition(copy(r), stmt[*i].xform); - } - } - // normal tiling - else { - std::set<int> private_stmt; - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); i != same_tile_controlling_loop.end(); i++) { -// if (same_tiled_loop.find(*i) == same_tiled_loop.end() && !is_single_iteration(getNewIS(*i), dim)) -// same_tiled_loop.insert(*i); - - // should test dim's value directly but it is ok for now -// if (same_tiled_loop.find(*i) == same_tiled_loop.end() && get_const(stmt[*i].xform, dim+1, Output_Var) == posInfinity) - if (same_tiled_loop.find(*i) == same_tiled_loop.end() && overflow.find(*i) != overflow.end()) - private_stmt.insert(*i); - } - - - // extract the union of the iteration space to be considered - Relation hull; - { - Tuple<Relation> r_list; - Tuple<int> r_mask; - - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); i != same_tile_controlling_loop.end(); i++) - if (private_stmt.find(*i) == private_stmt.end()) { - Relation r = project_onto_levels(getNewIS(*i), dim+1, true); - for (int j = outer_dim; j < dim; j++) - r = Project(r, j+1, Set_Var); - for (int j = 0; j < outer_dim; j += 2) - r = Project(r, j+1, Set_Var); - r_list.append(r); - r_mask.append(1); - } - - hull = Hull(r_list, r_mask, 1, true); - } - - // extract the bound of the dimension to be tiled - Relation bound = get_loop_bound(hull, dim); - if (!bound.has_single_conjunct()) { - // further simplify the bound - hull = Approximate(hull); - bound = get_loop_bound(hull, dim); - - int i = outer_dim - 2; - while (!bound.has_single_conjunct() && i >= 0) { - hull = Project(hull, i+1, Set_Var); - bound = get_loop_bound(hull, dim); - i -= 2; - } - - if (!bound.has_single_conjunct()) - throw loop_error("cannot handle tile bounds"); - } - - // separate lower and upper bounds - std::vector<GEQ_Handle> lb_list, ub_list; - { - Conjunct *c = bound.query_DNF()->single_conjunct(); - for (GEQ_Iterator gi(c->GEQs()); gi; gi++) { - int coef = (*gi).get_coef(bound.set_var(dim+1)); - if (coef < 0) - ub_list.push_back(*gi); - else if (coef > 0) - lb_list.push_back(*gi); - } - } - if (lb_list.size() == 0) - throw loop_error("unable to calculate tile controlling loop lower bound"); - if (ub_list.size() == 0) - throw loop_error("unable to calculate tile controlling loop upper bound"); - - // find the simplest lower bound for StridedTile or simplest iteration count for CountedTile - int simplest_lb = 0, simplest_ub = 0; - if (method == StridedTile) { - int best_cost = INT_MAX; - for (int i = 0; i < lb_list.size(); i++) { - int cost = 0; - for (Constr_Vars_Iter ci(lb_list[i]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - cost += 5; - break; - } - case Global_Var: { - cost += 2; - break; - } - default: - cost += 15; - break; - } - } - - if (cost < best_cost) { - best_cost = cost; - simplest_lb = i; - } - } - } - else if (method == CountedTile) { - std::map<Variable_ID, coef_t> s1, s2, s3; - int best_cost = INT_MAX; - for (int i = 0; i < lb_list.size(); i++) - for (int j = 0; j < ub_list.size(); j++) { - int cost = 0; - - for (Constr_Vars_Iter ci(lb_list[i]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - s1[(*ci).var] += (*ci).coef; - break; - } - case Global_Var: { - s2[(*ci).var] += (*ci).coef; - break; - } - case Exists_Var: - case Wildcard_Var: { - s3[(*ci).var] += (*ci).coef; - break; - } - default: - cost = INT_MAX-2; - break; - } - } - - for (Constr_Vars_Iter ci(ub_list[j]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - s1[(*ci).var] += (*ci).coef; - break; - } - case Global_Var: { - s2[(*ci).var] += (*ci).coef; - break; - } - case Exists_Var: - case Wildcard_Var: { - s3[(*ci).var] += (*ci).coef; - break; - } - default: - if (cost == INT_MAX-2) - cost = INT_MAX-1; - else - cost = INT_MAX-3; - break; - } - } - - if (cost == 0) { - for (std::map<Variable_ID, coef_t>::iterator k = s1.begin(); k != s1.end(); k++) - if ((*k).second != 0) - cost += 5; - for (std::map<Variable_ID, coef_t>::iterator k = s2.begin(); k != s2.end(); k++) - if ((*k).second != 0) - cost += 2; - for (std::map<Variable_ID, coef_t>::iterator k = s3.begin(); k != s3.end(); k++) - if ((*k).second != 0) - cost += 15; - } - - if (cost < best_cost) { - best_cost = cost; - simplest_lb = i; - simplest_ub = j; - } - } - } - - // prepare the new transformation relations - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); i != same_tile_controlling_loop.end(); i++) { - Relation r(stmt[*i].xform.n_out(), stmt[*i].xform.n_out()+2); - F_And *f_root = r.add_and(); - for (int j = 0; j < outer_dim-1; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(j+1), 1); - h.update_coef(r.input_var(j+1), -1); - } - - for (int j = outer_dim-1; j < stmt[*i].xform.n_out(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(j+3), 1); - h.update_coef(r.input_var(j+1), -1); - } - - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(outer_dim), 1); - h.update_const(-lex[outer_dim-1]); - - stmt[*i].xform = Composition(r, stmt[*i].xform); - } - - // add tiling constraints. - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); i != same_tile_controlling_loop.end(); i++) { - F_And *f_super_root = stmt[*i].xform.and_with_and(); - F_Exists *f_exists = f_super_root->add_exists(); - F_And *f_root = f_exists->add_and(); - - // create a lower bound variable for easy formula creation later - Variable_ID aligned_lb; - { - Variable_ID lb = f_exists->declare(); - coef_t coef = lb_list[simplest_lb].get_coef(bound.set_var(dim+1)); - if (coef == 1) { // e.g. if i >= m+5, then LB = m+5 - EQ_Handle h = f_root->add_EQ(); - h.update_coef(lb, 1); - for (Constr_Vars_Iter ci(lb_list[simplest_lb]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos != dim + 1) - h.update_coef(stmt[*i].xform.output_var(pos), (*ci).coef); - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, (*ci).var->function_of()); - h.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h.update_const(lb_list[simplest_lb].get_const()); - } - else { // e.g. if 2i >= m+5, then m+5 <= 2*LB < m+5+2 - GEQ_Handle h1 = f_root->add_GEQ(); - GEQ_Handle h2 = f_root->add_GEQ(); - for (Constr_Vars_Iter ci(lb_list[simplest_lb]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos == dim + 1) { - h1.update_coef(lb, (*ci).coef); - h2.update_coef(lb, -(*ci).coef); - } - else { - h1.update_coef(stmt[*i].xform.output_var(pos), (*ci).coef); - h2.update_coef(stmt[*i].xform.output_var(pos), -(*ci).coef); - } - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, (*ci).var->function_of()); - h1.update_coef(v, (*ci).coef); - h2.update_coef(v, -(*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h1.update_const(lb_list[simplest_lb].get_const()); - h2.update_const(-lb_list[simplest_lb].get_const()); - h2.update_const(coef-1); - } - - Variable_ID offset_lb; - if (alignment_offset == 0) - offset_lb = lb; - else { - EQ_Handle h = f_root->add_EQ(); - offset_lb = f_exists->declare(); - h.update_coef(offset_lb, 1); - h.update_coef(lb, -1); - h.update_const(alignment_offset); - } - - if (alignment_multiple == 1) { // trivial - aligned_lb = offset_lb; - } - else { // e.g. to align at 4, aligned_lb = 4*alpha && LB-4 < 4*alpha <= LB - aligned_lb = f_exists->declare(); - Variable_ID e = f_exists->declare(); - - EQ_Handle h = f_root->add_EQ(); - h.update_coef(aligned_lb, 1); - h.update_coef(e, -alignment_multiple); - - GEQ_Handle h1 = f_root->add_GEQ(); - GEQ_Handle h2 = f_root->add_GEQ(); - h1.update_coef(e, alignment_multiple); - h2.update_coef(e, -alignment_multiple); - h1.update_coef(offset_lb, -1); - h2.update_coef(offset_lb, 1); - h1.update_const(alignment_multiple-1); - } - } - - // create an upper bound variable for easy formula creation later - Variable_ID ub = f_exists->declare(); - { - coef_t coef = -ub_list[simplest_ub].get_coef(bound.set_var(dim+1)); - if (coef == 1) { // e.g. if i <= m+5, then UB = m+5 - EQ_Handle h = f_root->add_EQ(); - h.update_coef(ub, -1); - for (Constr_Vars_Iter ci(ub_list[simplest_ub]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos != dim + 1) - h.update_coef(stmt[*i].xform.output_var(pos), (*ci).coef); - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, (*ci).var->function_of()); - h.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h.update_const(ub_list[simplest_ub].get_const()); - } - else { // e.g. if 2i <= m+5, then m+5-2 < 2*UB <= m+5 - GEQ_Handle h1 = f_root->add_GEQ(); - GEQ_Handle h2 = f_root->add_GEQ(); - for (Constr_Vars_Iter ci(ub_list[simplest_ub]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos == dim + 1) { - h1.update_coef(ub, -(*ci).coef); - h2.update_coef(ub, (*ci).coef); - } - else { - h1.update_coef(stmt[*i].xform.output_var(pos), -(*ci).coef); - h2.update_coef(stmt[*i].xform.output_var(pos), (*ci).coef); - } - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, (*ci).var->function_of()); - h1.update_coef(v, -(*ci).coef); - h2.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h1.update_const(-ub_list[simplest_ub].get_const()); - h2.update_const(ub_list[simplest_ub].get_const()); - h1.update_const(coef-1); - } - } - - // insert tile controlling loop constraints - if (method == StridedTile) { // e.g. ii = LB + 32 * alpha && alpha >= 0 - Variable_ID e = f_exists->declare(); - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(e, 1); - - EQ_Handle h2 = f_root->add_EQ(); - h2.update_coef(stmt[*i].xform.output_var(outer_dim+1), 1); - h2.update_coef(e, -tile_size); - h2.update_coef(aligned_lb, -1); - } - else if (method == CountedTile) { // e.g. 0 <= ii < ceiling((UB-LB+1)/32) - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(stmt[*i].xform.output_var(outer_dim+1), 1); - - GEQ_Handle h2 = f_root->add_GEQ(); - h2.update_coef(stmt[*i].xform.output_var(outer_dim+1), -tile_size); - h2.update_coef(aligned_lb, -1); - h2.update_coef(ub, 1); - } - - // special care for private statements like overflow assignment - if (private_stmt.find(*i) != private_stmt.end()) { // e.g. ii <= UB - GEQ_Handle h = f_root->add_GEQ(); - h.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - h.update_coef(ub, 1); - } - // if (private_stmt.find(*i) != private_stmt.end()) { - // if (stmt[*i].xform.n_out() > dim+3) { // e.g. ii <= UB && i = ii - // GEQ_Handle h = f_root->add_GEQ(); - // h.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - // h.update_coef(ub, 1); - - // stmt[*i].xform = Project(stmt[*i].xform, dim+3, Output_Var); - // f_root = stmt[*i].xform.and_with_and(); - // EQ_Handle h1 = f_root->add_EQ(); - // h1.update_coef(stmt[*i].xform.output_var(dim+3), 1); - // h1.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - // } - // else if (method == StridedTile) { // e.g. ii <= UB since i does not exist - // GEQ_Handle h = f_root->add_GEQ(); - // h.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - // h.update_coef(ub, 1); - // } - // } - - // restrict original loop index inside the tile - else { - if (method == StridedTile) { // e.g. ii <= i < ii + tile_size - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(stmt[*i].xform.output_var(dim+3), 1); - h1.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - - GEQ_Handle h2 = f_root->add_GEQ(); - h2.update_coef(stmt[*i].xform.output_var(dim+3), -1); - h2.update_coef(stmt[*i].xform.output_var(outer_dim+1), 1); - h2.update_const(tile_size-1); - } - else if (method == CountedTile) { // e.g. LB+32*ii <= i < LB+32*ii+tile_size - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(stmt[*i].xform.output_var(outer_dim+1), -tile_size); - h1.update_coef(stmt[*i].xform.output_var(dim+3), 1); - h1.update_coef(aligned_lb, -1); - - GEQ_Handle h2 = f_root->add_GEQ(); - h2.update_coef(stmt[*i].xform.output_var(outer_dim+1), tile_size); - h2.update_coef(stmt[*i].xform.output_var(dim+3), -1); - h2.update_const(tile_size-1); - h2.update_coef(aligned_lb, 1); - } - } - } - } - - // update loop level information - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); i != same_tile_controlling_loop.end(); i++) { - for (int j = 1; j <= stmt[*i].loop_level.size(); j++) - switch (stmt[*i].loop_level[j-1].type) { - case LoopLevelOriginal: - break; - case LoopLevelTile: - if (stmt[*i].loop_level[j-1].payload >= outer_level) - stmt[*i].loop_level[j-1].payload++; - break; - default: - throw loop_error("unknown loop level type for statement " + to_string(*i)); - } - - LoopLevel ll; - ll.type = LoopLevelTile; - ll.payload = level+1; - ll.parallel_level = 0; - stmt[*i].loop_level.insert(stmt[*i].loop_level.begin()+(outer_level-1), ll); - } -} - - - -std::set<int> Loop::unroll(int stmt_num, int level, int unroll_amount) { - // check for sanity of parameters - if (unroll_amount < 0) - throw std::invalid_argument("invalid unroll amount " + to_string(unroll_amount)); - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - int dim = 2*level - 1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim-1); - - // nothing to do - if (unroll_amount == 1) - return std::set<int>(); - - // extract the intersection of the iteration space to be considered - Relation hull = Relation::True(level); - apply_xform(same_loop); - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - if (stmt[*i].IS.is_upper_bound_satisfiable()) { - Relation mapping(stmt[*i].IS.n_set(), level); - F_And *f_root = mapping.add_and(); - for (int j = 1; j <= level; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.input_var(j), 1); - h.update_coef(mapping.output_var(j), -1); - } - hull = Intersection(hull, Range(Restrict_Domain(mapping, copy(stmt[*i].IS)))); - hull.simplify(2, 4); - } - } - for (int i = 1; i <= level; i++) { - std::string name = tmp_loop_var_name_prefix + to_string(i); - hull.name_set_var(i, name); - } - hull.setup_names(); - - // extract the exact loop bound of the dimension to be unrolled - if (is_single_loop_iteration(hull, level, this->known)) - return std::set<int>(); - Relation bound = get_loop_bound(hull, level, this->known); - if (!bound.has_single_conjunct() || !bound.is_satisfiable() || bound.is_tautology()) - throw loop_error("unable to extract loop bound for unrolling"); - - // extract the loop stride - EQ_Handle stride_eq; - int stride = 1; - { - bool simple_stride = true; - int strides = countStrides(bound.query_DNF()->single_conjunct(), bound.set_var(level), stride_eq, simple_stride); - if (strides > 1) - throw loop_error("too many strides"); - else if (strides == 1) { - int sign = stride_eq.get_coef(bound.set_var(level)); - Constr_Vars_Iter it(stride_eq, true); - stride = abs((*it).coef/sign); - } - } - - // separate lower and upper bounds - std::vector<GEQ_Handle> lb_list, ub_list; - { - Conjunct *c = bound.query_DNF()->single_conjunct(); - for (GEQ_Iterator gi(c->GEQs()); gi; gi++) { - int coef = (*gi).get_coef(bound.set_var(level)); - if (coef < 0) - ub_list.push_back(*gi); - else if (coef > 0) - lb_list.push_back(*gi); - } - } - - // simplify overflow expression for each pair of upper and lower bounds - std::vector<std::vector<std::map<Variable_ID, int> > > overflow_table(lb_list.size(), std::vector<std::map<Variable_ID, int> >(ub_list.size(), std::map<Variable_ID, int>())); - bool is_overflow_simplifiable = true; - for (int i = 0; i < lb_list.size(); i++) { - if (!is_overflow_simplifiable) - break; - - for (int j = 0; j < ub_list.size(); j++) { - // lower bound or upper bound has non-unit coefficient, can't simplify - if (ub_list[j].get_coef(bound.set_var(level)) != -1 || lb_list[i].get_coef(bound.set_var(level)) != 1) { - is_overflow_simplifiable = false; - break; - } - - for (Constr_Vars_Iter ci(ub_list[j]); ci; ci++) { - switch((*ci).var->kind()) { - case Input_Var: - { - if ((*ci).var != bound.set_var(level)) - overflow_table[i][j][(*ci).var] += (*ci).coef; - - break; - } - case Global_Var: - { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = bound.get_local(g); - else - v = bound.get_local(g, (*ci).var->function_of()); - overflow_table[i][j][(*ci).var] += (*ci).coef; - break; - } - default: - throw loop_error("failed to calculate overflow amount"); - } - } - overflow_table[i][j][NULL] += ub_list[j].get_const(); - - for (Constr_Vars_Iter ci(lb_list[i]); ci; ci++) { - switch((*ci).var->kind()) { - case Input_Var: - { - if ((*ci).var != bound.set_var(level)) { - overflow_table[i][j][(*ci).var] += (*ci).coef; - if (overflow_table[i][j][(*ci).var] == 0) - overflow_table[i][j].erase(overflow_table[i][j].find((*ci).var)); - } - break; - } - case Global_Var: - { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = bound.get_local(g); - else - v = bound.get_local(g, (*ci).var->function_of()); - overflow_table[i][j][(*ci).var] += (*ci).coef; - if (overflow_table[i][j][(*ci).var] == 0) - overflow_table[i][j].erase(overflow_table[i][j].find((*ci).var)); - break; - } - default: - throw loop_error("failed to calculate overflow amount"); - } - } - overflow_table[i][j][NULL] += lb_list[i].get_const(); - - overflow_table[i][j][NULL] += stride; - if (unroll_amount == 0 || (overflow_table[i][j].size() == 1 && overflow_table[i][j][NULL]/stride < unroll_amount)) - unroll_amount = overflow_table[i][j][NULL]/stride; - } - } - - // loop iteration count can't be determined, bail out gracefully - if (unroll_amount == 0) - return std::set<int>(); - - // further simply overflow calculation using coefficients' modular - if (is_overflow_simplifiable) { - for (int i = 0; i < lb_list.size(); i++) - for (int j = 0; j < ub_list.size(); j++) - if (stride == 1) { - for (std::map<Variable_ID, int>::iterator k = overflow_table[i][j].begin(); k != overflow_table[i][j].end(); ) - if ((*k).first != NULL) { - int t = int_mod_hat((*k).second, unroll_amount); - if (t == 0) { - overflow_table[i][j].erase(k++); - } - else { - int t2 = hull.query_variable_mod((*k).first, unroll_amount); - if (t2 != INT_MAX) { - overflow_table[i][j][NULL] += t * t2; - overflow_table[i][j].erase(k++); - } - else { - (*k).second = t; - k++; - } - } - } - else - k++; - - overflow_table[i][j][NULL] = int_mod_hat(overflow_table[i][j][NULL], unroll_amount); - - // Since we don't have MODULO instruction in SUIF yet (only MOD), make all coef positive in the final formula - for (std::map<Variable_ID, int>::iterator k = overflow_table[i][j].begin(); k != overflow_table[i][j].end(); k++) - if ((*k).second < 0) - (*k).second += unroll_amount; - } - } - - - // build overflow statement - CG_outputBuilder *ocg = ir->builder(); - CG_outputRepr *overflow_code = NULL; - Relation cond_upper(level), cond_lower(level); - Relation overflow_constraint(0); - F_And *overflow_constraint_root = overflow_constraint.add_and(); - std::vector<Free_Var_Decl *> over_var_list; - if (is_overflow_simplifiable && lb_list.size() == 1) { - for (int i = 0; i < ub_list.size(); i++) { - if (overflow_table[0][i].size() == 1) { - // upper splitting condition - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[i]); - h.update_const(((overflow_table[0][i][NULL]/stride)%unroll_amount) * -stride); - } - else { - // upper splitting condition - std::string over_name = overflow_var_name_prefix + to_string(overflow_var_name_counter++); - Free_Var_Decl *over_free_var = new Free_Var_Decl(over_name); - over_var_list.push_back(over_free_var); - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[i]); - h.update_coef(cond_upper.get_local(over_free_var), -stride); - - // insert constraint 0 <= overflow < unroll_amount - Variable_ID v = overflow_constraint.get_local(over_free_var); - GEQ_Handle h1 = overflow_constraint_root->add_GEQ(); - h1.update_coef(v, 1); - GEQ_Handle h2 = overflow_constraint_root->add_GEQ(); - h2.update_coef(v, -1); - h2.update_const(unroll_amount-1); - - // create overflow assignment - bound.setup_names(); - CG_outputRepr *rhs = NULL; - for (std::map<Variable_ID, int>::iterator j = overflow_table[0][i].begin(); j != overflow_table[0][i].end(); j++) - if ((*j).first != NULL) { - CG_outputRepr *t = ocg->CreateIdent((*j).first->name()); - if ((*j).second != 1) - t = ocg->CreateTimes(ocg->CreateInt((*j).second), t); - rhs = ocg->CreatePlus(rhs, t); - } - else - if ((*j).second != 0) - rhs = ocg->CreatePlus(rhs, ocg->CreateInt((*j).second)); - - if (stride != 1) - rhs = ocg->CreateIntegerCeil(rhs, ocg->CreateInt(stride)); - rhs = ocg->CreateIntegerMod(rhs, ocg->CreateInt(unroll_amount)); - - CG_outputRepr *lhs = ocg->CreateIdent(over_name); - init_code = ocg->StmtListAppend(init_code, ocg->CreateAssignment(0, lhs, ocg->CreateInt(0))); - lhs = ocg->CreateIdent(over_name); - overflow_code = ocg->StmtListAppend(overflow_code, ocg->CreateAssignment(0, lhs, rhs)); - } - } - - // lower splitting condition - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[0]); - } - else if (is_overflow_simplifiable && ub_list.size() == 1) { - for (int i = 0; i < lb_list.size(); i++) { - - if (overflow_table[i][0].size() == 1) { - // lower splitting condition - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[i]); - h.update_const(overflow_table[i][0][NULL] * -stride); - } - else { - // lower splitting condition - std::string over_name = overflow_var_name_prefix + to_string(overflow_var_name_counter++); - Free_Var_Decl *over_free_var = new Free_Var_Decl(over_name); - over_var_list.push_back(over_free_var); - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[i]); - h.update_coef(cond_lower.get_local(over_free_var), -stride); - - // insert constraint 0 <= overflow < unroll_amount - Variable_ID v = overflow_constraint.get_local(over_free_var); - GEQ_Handle h1 = overflow_constraint_root->add_GEQ(); - h1.update_coef(v, 1); - GEQ_Handle h2 = overflow_constraint_root->add_GEQ(); - h2.update_coef(v, -1); - h2.update_const(unroll_amount-1); - - // create overflow assignment - bound.setup_names(); - CG_outputRepr *rhs = NULL; - for (std::map<Variable_ID, int>::iterator j = overflow_table[0][i].begin(); j != overflow_table[0][i].end(); j++) - if ((*j).first != NULL) { - CG_outputRepr *t = ocg->CreateIdent((*j).first->name()); - if ((*j).second != 1) - t = ocg->CreateTimes(ocg->CreateInt((*j).second), t); - rhs = ocg->CreatePlus(rhs, t); - } - else - if ((*j).second != 0) - rhs = ocg->CreatePlus(rhs, ocg->CreateInt((*j).second)); - - if (stride != 1) - rhs = ocg->CreateIntegerCeil(rhs, ocg->CreateInt(stride)); - rhs = ocg->CreateIntegerMod(rhs, ocg->CreateInt(unroll_amount)); - - CG_outputRepr *lhs = ocg->CreateIdent(over_name); - init_code = ocg->StmtListAppend(init_code, ocg->CreateAssignment(0, lhs, ocg->CreateInt(0))); - lhs = ocg->CreateIdent(over_name); - overflow_code = ocg->StmtListAppend(overflow_code, ocg->CreateAssignment(0, lhs, rhs)); - } - } - - // upper splitting condition - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[0]); - } - else { - std::string over_name = overflow_var_name_prefix + to_string(overflow_var_name_counter++); - Free_Var_Decl *over_free_var = new Free_Var_Decl(over_name); - over_var_list.push_back(over_free_var); - - Tuple<CG_outputRepr *> lb_repr_list, ub_repr_list; - for (int i = 0; i < lb_list.size(); i++) { - //lb_repr_list.append(outputLBasRepr(ocg, lb_list[i], bound, bound.set_var(dim+1), stride, stride_eq, Relation::True(bound.n_set()), std::vector<CG_outputRepr *>(bound.n_set(), NULL))); - lb_repr_list.append(outputLBasRepr(ocg, lb_list[i], bound, bound.set_var(dim+1), stride, stride_eq, Relation::True(bound.n_set()), std::vector<CG_outputRepr *>(bound.n_set()))); - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[i]); - } - for (int i = 0; i < ub_list.size(); i++) { - //ub_repr_list.append(outputUBasRepr(ocg, ub_list[i], bound, bound.set_var(dim+1), stride, stride_eq, std::vector<CG_outputRepr *>(bound.n_set(), NULL))); - ub_repr_list.append(outputUBasRepr(ocg, ub_list[i], bound, bound.set_var(dim+1), stride, stride_eq, std::vector<CG_outputRepr *>(bound.n_set()))); - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[i]); - h.update_coef(cond_upper.get_local(over_free_var), -stride); - } - - CG_outputRepr *lbRepr, *ubRepr; - if (lb_repr_list.size() > 1) - lbRepr = ocg->CreateInvoke("max", lb_repr_list); - else if (lb_repr_list.size() == 1) - lbRepr = lb_repr_list[1]; - - if (ub_repr_list.size() > 1) - ubRepr = ocg->CreateInvoke("min", ub_repr_list); - else if (ub_repr_list.size() == 1) - ubRepr = ub_repr_list[1]; - - // create overflow assignment - bound.setup_names(); - CG_outputRepr *rhs = ocg->CreatePlus(ocg->CreateMinus(ubRepr, lbRepr), ocg->CreateInt(1)); - if (stride != 1) - rhs = ocg->CreateIntegerDivide(rhs, ocg->CreateInt(stride)); - rhs = ocg->CreateIntegerMod(rhs, ocg->CreateInt(unroll_amount)); - CG_outputRepr *lhs = ocg->CreateIdent(over_name); - init_code = ocg->StmtListAppend(init_code, ocg->CreateAssignment(0, lhs, ocg->CreateInt(0))); - lhs = ocg->CreateIdent(over_name); - overflow_code = ocg->CreateAssignment(0, lhs, rhs); - - // insert constraint 0 <= overflow < unroll_amount - Variable_ID v = overflow_constraint.get_local(over_free_var); - GEQ_Handle h1 = overflow_constraint_root->add_GEQ(); - h1.update_coef(v, 1); - GEQ_Handle h2 = overflow_constraint_root->add_GEQ(); - h2.update_coef(v, -1); - h2.update_const(unroll_amount-1); - } - - // insert overflow statement - int overflow_stmt_num = -1; - if (overflow_code != NULL) { - // build iteration space for overflow statement - Relation mapping(level, level-1); - F_And *f_root = mapping.add_and(); - for (int i = 1; i < level; i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(i), 1); - h.update_coef(mapping.input_var(i), -1); - } - Relation overflow_IS = Range(Restrict_Domain(mapping, copy(hull))); - for (int i = 1; i < level; i++) - overflow_IS.name_set_var(i, hull.set_var(i)->name()); - overflow_IS.setup_names(); - - // build dumb transformation relation for overflow statement - Relation overflow_xform(level-1, 2*(level-1)+1); - f_root = overflow_xform.add_and(); - for (int i = 1; i <= level-1; i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(overflow_xform.output_var(2*i), 1); - h.update_coef(overflow_xform.input_var(i), -1); - - h = f_root->add_EQ(); - h.update_coef(overflow_xform.output_var(2*i-1), 1); - h.update_const(-lex[2*i-2]); - } - EQ_Handle h = f_root->add_EQ(); - h.update_coef(overflow_xform.output_var(2*(level-1)+1), 1); - h.update_const(-lex[2*(level-1)]); - - shiftLexicalOrder(lex, dim-1, 1); - Statement overflow_stmt; - overflow_stmt.code = overflow_code; - overflow_stmt.IS = overflow_IS; - overflow_stmt.xform = overflow_xform; - overflow_stmt.loop_level = std::vector<LoopLevel>(level-1); - for (int i = 0; i < level-1; i++) { - overflow_stmt.loop_level[i].type = stmt[stmt_num].loop_level[i].type; - if (stmt[stmt_num].loop_level[i].type == LoopLevelTile && - stmt[stmt_num].loop_level[i].payload >= level) - overflow_stmt.loop_level[i].payload = -1; - else - overflow_stmt.loop_level[i].payload = stmt[stmt_num].loop_level[i].payload; - overflow_stmt.loop_level[i].parallel_level = stmt[stmt_num].loop_level[i].parallel_level; - } - stmt.push_back(overflow_stmt); - dep.insert(); - overflow_stmt_num = stmt.size() - 1; - overflow[overflow_stmt_num] = over_var_list; - - // update the global known information on overflow variable - this->known = Intersection(this->known, Extend_Set(copy(overflow_constraint), this->known.n_set()-overflow_constraint.n_set())); - - // update dependence graph - DependenceVector dv; - dv.type = DEP_CONTROL; - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - dep.connect(overflow_stmt_num, *i, dv); - dv.type = DEP_W2W; - { - IR_ScalarSymbol *overflow_sym = NULL; - std::vector<IR_ScalarRef *> scalars = ir->FindScalarRef(overflow_code); - for (int i = scalars.size()-1; i >=0; i--) - if (scalars[i]->is_write()) { - overflow_sym = scalars[i]->symbol(); - break; - } - for (int i = scalars.size()-1; i >=0; i--) - delete scalars[i]; - dv.sym = overflow_sym; - } - dv.lbounds = std::vector<coef_t>(num_dep_dim, 0); - dv.ubounds = std::vector<coef_t>(num_dep_dim, 0); - int dep_dim = get_last_dep_dim_before(stmt_num, level); - for (int i = dep_dim + 1; i < num_dep_dim; i++) { - dv.lbounds[i] = -posInfinity; - dv.ubounds[i] = posInfinity; - } - for (int i = 0; i <= dep_dim; i++) { - if (i != 0) { - dv.lbounds[i-1] = 0; - dv.ubounds[i-1] = 0; - } - dv.lbounds[i] = 1; - dv.ubounds[i] = posInfinity; - dep.connect(overflow_stmt_num, overflow_stmt_num, dv); - } - } - - // split the loop so it can be fully unrolled - std::set<int> result = split(stmt_num, level, cond_upper); - std::set<int> result2 = split(stmt_num, level, cond_lower); - for (std::set<int>::iterator i = result2.begin(); i != result2.end(); i++) - result.insert(*i); - - // check if unrolled statements can be trivially lumped together as one statement - bool can_be_lumped = true; - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - if (*i != stmt_num) { - if (stmt[*i].loop_level.size() != stmt[stmt_num].loop_level.size()) { - can_be_lumped = false; - break; - } - for (int j = 0; j < stmt[stmt_num].loop_level.size(); j++) - if (!(stmt[*i].loop_level[j].type == stmt[stmt_num].loop_level[j].type && - stmt[*i].loop_level[j].payload == stmt[stmt_num].loop_level[j].payload)) { - can_be_lumped = false; - break; - } - if (!can_be_lumped) - break; - std::vector<int> lex2 = getLexicalOrder(*i); - for (int j = 2*level; j < lex.size()-1; j+=2) - if (lex[j] != lex2[j]) { - can_be_lumped = false; - break; - } - if (!can_be_lumped) - break; - } - } - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - if (is_inner_loop_depend_on_level(stmt[*i].IS, level, known)) { - can_be_lumped = false; - break; - } - } - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - if (*i != stmt_num) { - if (!(Must_Be_Subset(copy(stmt[*i].IS), copy(stmt[stmt_num].IS)) && Must_Be_Subset(copy(stmt[stmt_num].IS), copy(stmt[*i].IS)))) { - can_be_lumped = false; - break; - } - } - } - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - for (DependenceGraph::EdgeList::iterator j = dep.vertex[*i].second.begin(); j != dep.vertex[*i].second.end(); j++) - if (same_loop.find(j->first) != same_loop.end()) { - for (int k = 0; k < j->second.size(); k++) - if (j->second[k].type == DEP_CONTROL || j->second[k].type == DEP_UNKNOWN) { - can_be_lumped = false; - break; - } - if (!can_be_lumped) - break; - } - if (!can_be_lumped) - break; - } - } - - - // add strides to original statements - // for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - // add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - - - // std::vector<Free_Var_Decl *> depending_overflow_var; - // for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - // add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - // if (overflow.find(*i) != overflow.end()) { - // // TO DO: It should check whether overflow vaiable depends on - // // this loop index and by how much. This step is important if - // // you want to unroll loops in arbitrary order. - // depending_overflow_var.insert(depending_overflow_var.end(), overflow[*i].begin(), overflow[*i].end()); - - // continue; - // } - // } - - - -// std::map<int, std::vector<Statement> > pending; -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - -// if (overflow.find(*i) != overflow.end()) { -// // TO DO: It should check whether overflow vaiable depends on -// // this loop index and by how much. This step is important if -// // you want to unroll loops in arbitrary order. -// depending_overflow_var.insert(depending_overflow_var.end(), overflow[*i].begin(), overflow[*i].end()); - -// continue; -// } - -// // create copy for each unroll amount -// for (int j = 1; j < unroll_amount; j++) { -// Tuple<CG_outputRepr *> funcList; -// Tuple<std::string> loop_vars; -// loop_vars.append(stmt[*i].IS.set_var((dim+1)/2)->name()); -// funcList.append(ocg->CreatePlus(ocg->CreateIdent(stmt[*i].IS.set_var(level)->name()), ocg->CreateInt(j*stride))); -// CG_outputRepr *code = ocg->CreatePlaceHolder(0, stmt[*i].code->clone(), funcList, loop_vars); - -// // prepare the new statment to insert -// Statement unrolled_stmt; -// unrolled_stmt.IS = copy(stmt[*i].IS); -// // adjust_loop_bound(unrolled_stmt.IS, (dim-1)/2, j); -// unrolled_stmt.xform = copy(stmt[*i].xform); -// unrolled_stmt.code = code; -// unrolled_stmt.loop_level = stmt[*i].loop_level; -// pending[*i].push_back(unrolled_stmt); -// } -// } - -// // adjust iteration space due to loop bounds depending on this loop -// // index and affected overflow variables -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// for (int j = 0; j < pending[*i].size(); j++) { -// adjust_loop_bound(pending[*i][j].IS, (dim-1)/2, j+1, depending_overflow_var); -// //pending[*i][j].IS = Intersection(pending[*i][j].IS, Extend_Set(copy(this->known), pending[*i][j].IS.n_set() - this->known.n_set())); -// } -// } - - // insert unrolled statements - int old_num_stmt = stmt.size(); - if (!can_be_lumped) { - std::map<int, std::vector<int> > what_stmt_num; - - for (int j = 1; j < unroll_amount; j++) { - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - Statement new_stmt; - - Tuple<CG_outputRepr *> funcList; - Tuple<std::string> loop_vars; - loop_vars.append(stmt[*i].IS.set_var(level)->name()); - funcList.append(ocg->CreatePlus(ocg->CreateIdent(stmt[*i].IS.set_var(level)->name()), ocg->CreateInt(j*stride))); - new_stmt.code = ocg->CreatePlaceHolder(0, stmt[*i].code->clone(), funcList, loop_vars); - - new_stmt.IS = adjust_loop_bound(stmt[*i].IS, level, j * stride); - add_loop_stride(new_stmt.IS, bound, level-1, unroll_amount * stride); - - new_stmt.xform = copy(stmt[*i].xform); - new_stmt.loop_level = stmt[*i].loop_level; - stmt.push_back(new_stmt); - dep.insert(); - what_stmt_num[*i].push_back(stmt.size() - 1); - } - } - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - - - // update dependence graph - if (stmt[stmt_num].loop_level[level-1].type == LoopLevelOriginal) { - int dep_dim = stmt[stmt_num].loop_level[level-1].payload; - int new_stride = unroll_amount * stride; - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::pair<int, DependenceVector> > D; - - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); ) { - if (same_loop.find(i) != same_loop.end()) { - if (same_loop.find(j->first) != same_loop.end()) { - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.type == DEP_CONTROL || dv.type == DEP_UNKNOWN) { - D.push_back(std::make_pair(j->first, dv)); - for (int kk = 0; kk < unroll_amount - 1; kk++) - if (what_stmt_num[i][kk] != -1 && what_stmt_num[j->first][kk] != -1) - dep.connect(what_stmt_num[i][kk], what_stmt_num[j->first][kk], dv); - } - else { - coef_t lb = dv.lbounds[dep_dim]; - coef_t ub = dv.ubounds[dep_dim]; - if (ub == lb && int_mod(lb, static_cast<coef_t>(new_stride)) == 0) { - D.push_back(std::make_pair(j->first, dv)); - for (int kk = 0; kk < unroll_amount - 1; kk++) - if (what_stmt_num[i][kk] != -1 && what_stmt_num[j->first][kk] != -1) - dep.connect(what_stmt_num[i][kk], what_stmt_num[j->first][kk], dv); - } - else if (lb == -posInfinity && ub == posInfinity) { - D.push_back(std::make_pair(j->first, dv)); - for (int kk = 0; kk < unroll_amount; kk++) - if (kk == 0) - D.push_back(std::make_pair(j->first, dv)); - else if (what_stmt_num[j->first][kk-1] != -1) - D.push_back(std::make_pair(what_stmt_num[j->first][kk-1], dv)); - for (int t = 0; t < unroll_amount - 1; t++) - if (what_stmt_num[i][t] != -1) - for (int kk = 0; kk < unroll_amount; kk++) - if (kk == 0) - dep.connect(what_stmt_num[i][t], j->first, dv); - else if (what_stmt_num[j->first][kk-1] != -1) - dep.connect(what_stmt_num[i][t], what_stmt_num[j->first][kk-1], dv); - } - else { - for (int kk = 0; kk < unroll_amount; kk++) { - if (lb != -posInfinity) { - if (kk * stride < int_mod(lb, static_cast<coef_t>(new_stride))) - dv.lbounds[dep_dim] = floor(static_cast<double>(lb)/new_stride) * new_stride + new_stride; - else - dv.lbounds[dep_dim] = floor(static_cast<double>(lb)/new_stride) * new_stride; - } - if (ub != posInfinity) { - if (kk * stride > int_mod(ub, static_cast<coef_t>(new_stride))) - dv.ubounds[dep_dim] = floor(static_cast<double>(ub)/new_stride) * new_stride - new_stride; - else - dv.ubounds[dep_dim] = floor(static_cast<double>(ub)/new_stride) * new_stride; - } - if (dv.ubounds[dep_dim] >= dv.lbounds[dep_dim]) { - if (kk == 0) - D.push_back(std::make_pair(j->first, dv)); - else if (what_stmt_num[j->first][kk-1] != -1) - D.push_back(std::make_pair(what_stmt_num[j->first][kk-1], dv)); - } - } - for (int t = 0; t < unroll_amount-1; t++) - if (what_stmt_num[i][t] != -1) - for (int kk = 0; kk < unroll_amount; kk++) { - if (lb != -posInfinity) { - if (kk * stride < int_mod(lb+t+1, static_cast<coef_t>(new_stride))) - dv.lbounds[dep_dim] = floor(static_cast<double>(lb+(t+1)*stride)/new_stride) * new_stride + new_stride; - else - dv.lbounds[dep_dim] = floor(static_cast<double>(lb+(t+1)*stride)/new_stride) * new_stride; - } - if (ub != posInfinity) { - if (kk * stride > int_mod(ub+t+1, static_cast<coef_t>(new_stride))) - dv.ubounds[dep_dim] = floor(static_cast<double>(ub+(t+1)*stride)/new_stride) * new_stride - new_stride; - else - dv.ubounds[dep_dim] = floor(static_cast<double>(ub+(t+1)*stride)/new_stride) * new_stride; - } - if (dv.ubounds[dep_dim] >= dv.lbounds[dep_dim]) { - if (kk == 0) - dep.connect(what_stmt_num[i][t], j->first, dv); - else if (what_stmt_num[j->first][kk-1] != -1) - dep.connect(what_stmt_num[i][t], what_stmt_num[j->first][kk-1], dv); - } - } - } - } - } - - dep.vertex[i].second.erase(j++); - } - else { - for (int kk = 0; kk < unroll_amount - 1; kk++) - if (what_stmt_num[i][kk] != -1) - dep.connect(what_stmt_num[i][kk], j->first, j->second); - - j++; - } - } - else { - if (same_loop.find(j->first) != same_loop.end()) - for (int k = 0; k < j->second.size(); k++) - for (int kk = 0; kk < unroll_amount - 1; kk++) - if (what_stmt_num[j->first][kk] != -1) - D.push_back(std::make_pair(what_stmt_num[j->first][kk], j->second[k])); - j++; - } - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, D[j].first, D[j].second); - } - } - - // reset lexical order for the unrolled loop body - std::set<int> new_same_loop; - for (std::map<int, std::vector<int> >::iterator i = what_stmt_num.begin(); i != what_stmt_num.end(); i++) { - new_same_loop.insert(i->first); - for (int j = 0; j < i->second.size(); j++) - new_same_loop.insert(i->second[j]); - } - setLexicalOrder(dim+1, new_same_loop); - } - else { - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - - int max_level = stmt[stmt_num].loop_level.size(); - std::vector<std::pair<int, int> > stmt_order; - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - stmt_order.push_back(std::make_pair(get_const(stmt[*i].xform, 2*max_level, Output_Var), *i)); - sort(stmt_order.begin(), stmt_order.end()); - - Statement new_stmt; - new_stmt.code = NULL; - for (int j = 1; j < unroll_amount; j++) - for (int i = 0; i < stmt_order.size(); i++) { - Tuple<CG_outputRepr *> funcList; - Tuple<std::string> loop_vars; - loop_vars.append(stmt[stmt_order[i].second].IS.set_var(level)->name()); - funcList.append(ocg->CreatePlus(ocg->CreateIdent(stmt[stmt_order[i].second].IS.set_var(level)->name()), ocg->CreateInt(j*stride))); - CG_outputRepr *code = ocg->CreatePlaceHolder(0, stmt[stmt_order[i].second].code->clone(), funcList, loop_vars); - new_stmt.code = ocg->StmtListAppend(new_stmt.code, code); - } - - new_stmt.IS = copy(stmt[stmt_num].IS); - new_stmt.xform = copy(stmt[stmt_num].xform); - assign_const(new_stmt.xform, 2*max_level, stmt_order[stmt_order.size()-1].first+1); - new_stmt.loop_level = stmt[stmt_num].loop_level; - stmt.push_back(new_stmt); - dep.insert(); - - // update dependence graph - if (stmt[stmt_num].loop_level[level-1].type == LoopLevelOriginal) { - int dep_dim = stmt[stmt_num].loop_level[level-1].payload; - int new_stride = unroll_amount * stride; - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::pair<int, std::vector<DependenceVector> > > D; - - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); ) { - if (same_loop.find(i) != same_loop.end()) { - if (same_loop.find(j->first) != same_loop.end()) { - std::vector<DependenceVector> dvs11, dvs12, dvs22, dvs21; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.type == DEP_CONTROL || dv.type == DEP_UNKNOWN) { - if (i == j->first) { - dvs11.push_back(dv); - dvs22.push_back(dv); - } - else - throw loop_error("unrolled statements lumped together illegally"); - } - else { - coef_t lb = dv.lbounds[dep_dim]; - coef_t ub = dv.ubounds[dep_dim]; - if (ub == lb && int_mod(lb, static_cast<coef_t>(new_stride)) == 0) { - dvs11.push_back(dv); - dvs22.push_back(dv); - } - else { - if (lb != -posInfinity) - dv.lbounds[dep_dim] = ceil(static_cast<double>(lb)/new_stride) * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = floor(static_cast<double>(ub)/new_stride) * new_stride; - if (dv.ubounds[dep_dim] >= dv.lbounds[dep_dim]) - dvs11.push_back(dv); - - if (lb != -posInfinity) - dv.lbounds[dep_dim] = ceil(static_cast<double>(lb)/new_stride) * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = ceil(static_cast<double>(ub)/new_stride) * new_stride; - if (dv.ubounds[dep_dim] >= dv.lbounds[dep_dim]) - dvs21.push_back(dv); - - if (lb != -posInfinity) - dv.lbounds[dep_dim] = floor(static_cast<double>(lb)/new_stride) * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = floor(static_cast<double>(ub-stride)/new_stride) * new_stride; - if (dv.ubounds[dep_dim] >= dv.lbounds[dep_dim]) - dvs12.push_back(dv); - - if (lb != -posInfinity) - dv.lbounds[dep_dim] = floor(static_cast<double>(lb)/new_stride) * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = ceil(static_cast<double>(ub-stride)/new_stride) * new_stride; - if (dv.ubounds[dep_dim] >= dv.lbounds[dep_dim]) - dvs22.push_back(dv); - } - } - } - if (dvs11.size() > 0) - D.push_back(std::make_pair(i, dvs11)); - if (dvs22.size() > 0) - dep.connect(old_num_stmt, old_num_stmt, dvs22); - if (dvs12.size() > 0) - D.push_back(std::make_pair(old_num_stmt, dvs12)); - if (dvs21.size() > 0) - dep.connect(old_num_stmt, i, dvs21); - - dep.vertex[i].second.erase(j++); - } - else { - dep.connect(old_num_stmt, j->first, j->second); - j++; - } - } - else { - if (same_loop.find(j->first) != same_loop.end()) - D.push_back(std::make_pair(old_num_stmt, j->second)); - j++; - } - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, D[j].first, D[j].second); - } - } - } - - return result; -} - - -std::vector<int> Loop::getLexicalOrder(int stmt_num) const { - assert(stmt_num < stmt.size()); - - const int n = stmt[stmt_num].xform.n_out(); - std::vector<int> lex(n,0); - - for (int i = 0; i < n; i += 2) - lex[i] = get_const(stmt[stmt_num].xform, i, Output_Var); - - return lex; -} - -std::set<int> Loop::getStatements(const std::vector<int> &lex, int dim) const { - const int m = stmt.size(); - - std::set<int> same_loops; - for (int i = 0; i < m; i++) { - if (dim < 0) - same_loops.insert(i); - else { - std::vector<int> a_lex = getLexicalOrder(i); - int j; - for (j = 0; j <= dim; j+=2) - if (lex[j] != a_lex[j]) - break; - if (j > dim) - same_loops.insert(i); - } - } - - return same_loops; -} - - -void Loop::shiftLexicalOrder(const std::vector<int> &lex, int dim, int amount) { - const int m = stmt.size(); - - if (amount == 0) - return; - - for (int i = 0; i < m; i++) { - std::vector<int> lex2 = getLexicalOrder(i); - - bool need_shift = true; - - for (int j = 0; j < dim; j++) - if (lex2[j] != lex[j]) { - need_shift = false; - break; - } - - if (!need_shift) - continue; - - if (amount > 0) { - if (lex2[dim] < lex[dim]) - continue; - } - else if (amount < 0) { - if (lex2[dim] > lex[dim]) - continue; - } - - assign_const(stmt[i].xform, dim, lex2[dim] + amount); - } -} - - -void Loop::setLexicalOrder(int dim, const std::set<int> &active, int starting_order) { - if (active.size() == 0) - return; - - // check for sanity of parameters - if (dim < 0 || dim % 2 != 0) - throw std::invalid_argument("invalid constant loop level to set lexicographical order"); - std::vector<int> lex; - int ref_stmt_num; - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - if ((*i) < 0 || (*i) >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(*i)); - if (dim >= stmt[*i].xform.n_out()) - throw std::invalid_argument("invalid constant loop level to set lexicographical order"); - if (i == active.begin()) { - lex = getLexicalOrder(*i); - ref_stmt_num = *i; - } - else { - std::vector<int> lex2 = getLexicalOrder(*i); - for (int j = 0; j < dim; j+=2) - if (lex[j] != lex2[j]) - throw std::invalid_argument("statements are not in the same sub loop nest"); - } - } - - // sepearate statements by current loop level types - int level = (dim+2)/2; - std::map<std::pair<LoopLevelType, int>, std::set<int> > active_by_level_type; - std::set<int> active_by_no_level; - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - if (level > stmt[*i].loop_level.size()) - active_by_no_level.insert(*i); - else - active_by_level_type[std::make_pair(stmt[*i].loop_level[level-1].type, stmt[*i].loop_level[level-1].payload)].insert(*i); - } - - // further separate statements due to control dependences - std::vector<std::set<int> > active_by_level_type_splitted; - for (std::map<std::pair<LoopLevelType, int>, std::set<int> >::iterator i = active_by_level_type.begin(); i != active_by_level_type.end(); i++) - active_by_level_type_splitted.push_back(i->second); - for (std::set<int>::iterator i = active_by_no_level.begin(); i != active_by_no_level.end(); i++) - for (int j = active_by_level_type_splitted.size() - 1; j >= 0; j--) { - std::set<int> controlled, not_controlled; - for (std::set<int>::iterator k = active_by_level_type_splitted[j].begin(); k != active_by_level_type_splitted[j].end(); k++) { - std::vector<DependenceVector> dvs = dep.getEdge(*i, *k); - bool is_controlled = false; - for (int kk = 0; kk < dvs.size(); kk++) - if (dvs[kk].type = DEP_CONTROL) { - is_controlled = true; - break; - } - if (is_controlled) - controlled.insert(*k); - else - not_controlled.insert(*k); - } - if (controlled.size() != 0 && not_controlled.size() != 0) { - active_by_level_type_splitted.erase(active_by_level_type_splitted.begin() + j); - active_by_level_type_splitted.push_back(controlled); - active_by_level_type_splitted.push_back(not_controlled); - } - } - - // set lexical order separating loops with different loop types first - if (active_by_level_type_splitted.size() + active_by_no_level.size() > 1) { - int dep_dim = get_last_dep_dim_before(ref_stmt_num, level) + 1; - - Graph<std::set<int>, Empty> g; - for (std::vector<std::set<int> >::iterator i = active_by_level_type_splitted.begin(); i != active_by_level_type_splitted.end(); i++) - g.insert(*i); - for (std::set<int>::iterator i = active_by_no_level.begin(); i != active_by_no_level.end(); i++) { - std::set<int> t; - t.insert(*i); - g.insert(t); - } - for (int i = 0; i < g.vertex.size(); i++) - for (int j = i+1; j < g.vertex.size(); j++) { - bool connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*ii, *jj); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() || - (dvs[k].is_data_dependence() && !dvs[k].has_been_carried_before(dep_dim))) { - g.connect(i, j); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*jj, *ii); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() || - (dvs[k].is_data_dependence() && !dvs[k].has_been_carried_before(dep_dim))) { - g.connect(j, i); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - } - - std::vector<std::set<int> > s = g.topoSort(); - if (s.size() != g.vertex.size()) - throw loop_error("cannot separate statements with different loop types at loop level " + to_string(level)); - - // assign lexical order - int order = starting_order; - for (int i = 0; i < s.size(); i++) { - std::set<int> &cur_scc = g.vertex[*(s[i].begin())].first; - int sz = cur_scc.size(); - if (sz == 1) { - int cur_stmt = *(cur_scc.begin()); - assign_const(stmt[cur_stmt].xform, dim, order); - for (int j = dim+2; j < stmt[cur_stmt].xform.n_out(); j+=2) - assign_const(stmt[cur_stmt].xform, j, 0); - order++; - } - else { - setLexicalOrder(dim, cur_scc, order); - order += sz; - } - } - } - // set lexical order seperating single iteration statements and loops - else { - std::set<int> true_singles; - std::set<int> nonsingles; - std::map<coef_t, std::set<int> > fake_singles; - - // sort out statements that do not require loops - for(std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - Relation cur_IS = getNewIS(*i); - if (is_single_iteration(cur_IS, dim+1)) { - bool is_all_single = true; - for (int j = dim+3; j < stmt[*i].xform.n_out(); j+=2) - if (!is_single_iteration(cur_IS, j)) { - is_all_single = false; - break; - } - if (is_all_single) - true_singles.insert(*i); - else { - try { - fake_singles[get_const(cur_IS, dim+1, Set_Var)].insert(*i); - } - catch (const std::exception &e) { - fake_singles[posInfinity].insert(*i); - } - } - } - else - nonsingles.insert(*i); - } - - // split nonsingles forcibly according to negative dependences present (loop unfusible) - int dep_dim = get_dep_dim_of(ref_stmt_num, level); - Graph<int, Empty> g2; - for (std::set<int>::iterator i = nonsingles.begin(); i != nonsingles.end(); i++) - g2.insert(*i); - for (int i = 0; i < g2.vertex.size(); i++) - for (int j = i+1; j < g2.vertex.size(); j++) { - std::vector<DependenceVector> dvs = dep.getEdge(g2.vertex[i].first, g2.vertex[j].first); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() || - (dvs[k].is_data_dependence() && dvs[k].has_negative_been_carried_at(dep_dim))) { - g2.connect(i, j); - break; - } - dvs = dep.getEdge(g2.vertex[j].first, g2.vertex[i].first); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() || - (dvs[k].is_data_dependence() && dvs[k].has_negative_been_carried_at(dep_dim))) { - g2.connect(j, i); - break; - } - } - - std::vector<std::set<int> > s2 = g2.packed_topoSort(); - - std::vector<std::set<int> > splitted_nonsingles; - for (int i = 0; i < s2.size(); i++) { - std::set<int> cur_scc; - for (std::set<int>::iterator j = s2[i].begin(); j != s2[i].end(); j++) - cur_scc.insert(g2.vertex[*j].first); - splitted_nonsingles.push_back(cur_scc); - } - - // convert to dependence graph for grouped statements - dep_dim = get_last_dep_dim_before(ref_stmt_num, level) + 1; - Graph<std::set<int>, Empty> g; - for (std::set<int>::iterator i = true_singles.begin(); i != true_singles.end(); i++) { - std::set<int> t; - t.insert(*i); - g.insert(t); - } - for (int i = 0; i < splitted_nonsingles.size(); i++) { - g.insert(splitted_nonsingles[i]); - } - for (std::map<coef_t, std::set<int> >::iterator i = fake_singles.begin(); i != fake_singles.end(); i++) - g.insert((*i).second); - - for (int i = 0; i < g.vertex.size(); i++) - for (int j = i + 1; j < g.vertex.size(); j++) { - bool connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*ii, *jj); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() || - (dvs[k].is_data_dependence() && !dvs[k].has_been_carried_before(dep_dim))) { - g.connect(i, j); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*jj, *ii); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() || - (dvs[k].is_data_dependence() && !dvs[k].has_been_carried_before(dep_dim))) { - g.connect(j, i); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - } - - // topological sort according to chun's permute algorithm - std::vector<std::set<int> > s = g.topoSort(); - - // assign lexical order - int order = starting_order; - for (int i = 0; i < s.size(); i++) { - // translate each SCC into original statements - std::set<int> cur_scc; - for (std::set<int>::iterator j = s[i].begin(); j != s[i].end(); j++) - copy(g.vertex[*j].first.begin(), g.vertex[*j].first.end(), inserter(cur_scc, cur_scc.begin())); - - // now assign the constant - for(std::set<int>::iterator j = cur_scc.begin(); j != cur_scc.end(); j++) - assign_const(stmt[*j].xform, dim, order); - - if (cur_scc.size() > 1) - setLexicalOrder(dim+2, cur_scc); - else if (cur_scc.size() == 1) { - int cur_stmt =*(cur_scc.begin()); - for (int j = dim+2; j < stmt[cur_stmt].xform.n_out(); j+=2) - assign_const(stmt[cur_stmt].xform, j, 0); - } - - if (cur_scc.size() > 0) - order++; - } - } -} - - -void Loop::apply_xform() { - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - apply_xform(active); -} - - -void Loop::apply_xform(int stmt_num) { - std::set<int> active; - active.insert(stmt_num); - apply_xform(active); -} - - -void Loop::apply_xform(std::set<int> &active) { - int max_n = 0; - - CG_outputBuilder *ocg = ir->builder(); - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - int n = stmt[*i].loop_level.size(); - if (n > max_n) - max_n = n; - - std::vector<int> lex = getLexicalOrder(*i); - - Relation mapping(2*n+1, n); - F_And *f_root = mapping.add_and(); - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(j), 1); - h.update_coef(mapping.input_var(2*j), -1); - } - mapping = Composition(mapping, stmt[*i].xform); - mapping.simplify(); - - // match omega input/output variables to variable names in the code - for (int j = 1; j <= stmt[*i].IS.n_set(); j++) - mapping.name_input_var(j, stmt[*i].IS.set_var(j)->name()); - for (int j = 1; j <= n; j++) - mapping.name_output_var(j, tmp_loop_var_name_prefix + to_string(tmp_loop_var_name_counter+j-1)); - mapping.setup_names(); - - Relation known = Extend_Set(copy(this->known), mapping.n_out() - this->known.n_set()); - //stmt[*i].code = outputStatement(ocg, stmt[*i].code, 0, mapping, known, std::vector<CG_outputRepr *>(mapping.n_out(), NULL)); - stmt[*i].code = outputStatement(ocg, stmt[*i].code, 0, mapping, known, std::vector<CG_outputRepr *>(mapping.n_out())); - stmt[*i].IS = Range(Restrict_Domain(mapping, stmt[*i].IS)); - stmt[*i].IS.simplify(); - - // replace original transformation relation with straight 1-1 mapping - mapping = Relation(n, 2*n+1); - f_root = mapping.add_and(); - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2*j), 1); - h.update_coef(mapping.input_var(j), -1); - } - for (int j = 1; j <= 2*n+1; j+=2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(j), 1); - h.update_const(-lex[j-1]); - } - stmt[*i].xform = mapping; - } - - tmp_loop_var_name_counter += max_n; -} - - -void Loop::addKnown(const Relation &cond) { - int n1 = this->known.n_set(); - - Relation r = copy(cond); - int n2 = r.n_set(); - - if (n1 < n2) - this->known = Extend_Set(this->known, n2-n1); - else if (n1 > n2) - r = Extend_Set(r, n1-n2); - - this->known = Intersection(this->known, r); -} - - -bool Loop::nonsingular(const std::vector<std::vector<int> > &T) { - if (stmt.size() == 0) - return true; - - // check for sanity of parameters - for (int i = 0; i < stmt.size(); i++) { - if (stmt[i].loop_level.size() != num_dep_dim) - throw std::invalid_argument("nonsingular loop transformations must be applied to original perfect loop nest"); - for (int j = 0; j < stmt[i].loop_level.size(); j++) - if (stmt[i].loop_level[j].type != LoopLevelOriginal) - throw std::invalid_argument("nonsingular loop transformations must be applied to original perfect loop nest"); - } - if (T.size() != num_dep_dim) - throw std::invalid_argument("invalid transformation matrix"); - for (int i = 0; i < stmt.size(); i++) - if (T[i].size() != num_dep_dim + 1 && T[i].size() != num_dep_dim) - throw std::invalid_argument("invalid transformation matrix"); - - // build relation from matrix - Relation mapping(2*num_dep_dim+1, 2*num_dep_dim+1); - F_And *f_root = mapping.add_and(); - for (int i = 0; i < num_dep_dim; i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2*(i+1)), -1); - for (int j = 0; j < num_dep_dim; j++) - if (T[i][j] != 0) - h.update_coef(mapping.input_var(2*(j+1)), T[i][j]); - if (T[i].size() == num_dep_dim+1) - h.update_const(T[i][num_dep_dim]); - } - for (int i = 1; i <= 2*num_dep_dim+1; i+=2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(i), -1); - h.update_coef(mapping.input_var(i), 1); - } - - // update transformation relations - for (int i = 0; i < stmt.size(); i++) - stmt[i].xform = Composition(copy(mapping), stmt[i].xform); - - // update dependence graph - for (int i = 0; i < dep.vertex.size(); i++) - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); j++) { - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - switch (dv.type) { - case DEP_W2R: - case DEP_R2W: - case DEP_W2W: - case DEP_R2R: { - std::vector<coef_t> lbounds(num_dep_dim), ubounds(num_dep_dim); - for (int p = 0; p < num_dep_dim; p++) { - coef_t lb = 0; - coef_t ub = 0; - for (int q = 0; q < num_dep_dim; q++) { - if (T[p][q] > 0) { - if (lb == -posInfinity || dv.lbounds[q] == -posInfinity) - lb = -posInfinity; - else - lb += T[p][q] * dv.lbounds[q]; - if (ub == posInfinity || dv.ubounds[q] == posInfinity) - ub = posInfinity; - else - ub += T[p][q] * dv.ubounds[q]; - } - else if (T[p][q] < 0) { - if (lb == -posInfinity || dv.ubounds[q] == posInfinity) - lb = -posInfinity; - else - lb += T[p][q] * dv.ubounds[q]; - if (ub == posInfinity || dv.lbounds[q] == -posInfinity) - ub = posInfinity; - else - ub += T[p][q] * dv.lbounds[q]; - } - } - if (T[p].size() == num_dep_dim+1) { - if (lb != -posInfinity) - lb += T[p][num_dep_dim]; - if (ub != posInfinity) - ub += T[p][num_dep_dim]; - } - lbounds[p] = lb; - ubounds[p] = ub; - } - dv.lbounds = lbounds; - dv.ubounds = ubounds; - - break; - } - default: - ; - } - } - j->second = dvs; - } - - // set constant loop values - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - setLexicalOrder(0, active); - - return true; -} - - -void Loop::skew(const std::set<int> &stmt_nums, int level, const std::vector<int> &skew_amount) { - if (stmt_nums.size() == 0) - return; - - // check for sanity of parameters - int ref_stmt_num = *(stmt_nums.begin()); - for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { - if (*i < 0 || *i >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(*i)); - if (level < 1 || level > stmt[*i].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - for (int j = stmt[*i].loop_level.size(); j < skew_amount.size(); j++) - if (skew_amount[j] != 0) - throw std::invalid_argument("invalid skewing formula"); - } - - // set trasformation relations - for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { - int n = stmt[*i].xform.n_out(); - Relation r(n,n); - F_And *f_root = r.add_and(); - for (int j = 1; j <= n; j++) - if (j != 2*level) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j), -1); - } - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(2*level), -1); - for (int j = 0; j < skew_amount.size(); j++) - if (skew_amount[j] != 0) - h.update_coef(r.input_var(2*(j+1)), skew_amount[j]); - - stmt[*i].xform = Composition(r, stmt[*i].xform); - stmt[*i].xform.simplify(); - } - - // update dependence graph - if (stmt[ref_stmt_num].loop_level[level-1].type == LoopLevelOriginal) { - int dep_dim = stmt[ref_stmt_num].loop_level[level-1].payload; - for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) - for (DependenceGraph::EdgeList::iterator j = dep.vertex[*i].second.begin(); j != dep.vertex[*i].second.end(); j++) - if (stmt_nums.find(j->first) != stmt_nums.end()) { - // dependence between skewed statements - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - coef_t lb = 0; - coef_t ub = 0; - for (int kk = 0; kk < skew_amount.size(); kk++) { - int cur_dep_dim = get_dep_dim_of(*i, kk+1); - if (skew_amount[kk] > 0) { - if (lb != -posInfinity && - stmt[*i].loop_level[kk].type == LoopLevelOriginal && - dv.lbounds[cur_dep_dim] != -posInfinity) - lb += skew_amount[kk] * dv.lbounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 && !(dv.lbounds[cur_dep_dim] == 0 && dv.ubounds[cur_dep_dim] == 0)) - lb = -posInfinity; - } - if (ub != posInfinity && - stmt[*i].loop_level[kk].type == LoopLevelOriginal && - dv.ubounds[cur_dep_dim] != posInfinity) - ub += skew_amount[kk] * dv.ubounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 && !(dv.lbounds[cur_dep_dim] == 0 && dv.ubounds[cur_dep_dim] == 0)) - ub = posInfinity; - } - } - else if (skew_amount[kk] < 0) { - if (lb != -posInfinity && - stmt[*i].loop_level[kk].type == LoopLevelOriginal && - dv.ubounds[cur_dep_dim] != posInfinity) - lb += skew_amount[kk] * dv.ubounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 && !(dv.lbounds[cur_dep_dim] == 0 && dv.ubounds[cur_dep_dim] == 0)) - lb = -posInfinity; - } - if (ub != posInfinity && - stmt[*i].loop_level[kk].type == LoopLevelOriginal && - dv.lbounds[cur_dep_dim] != -posInfinity) - ub += skew_amount[kk] * dv.lbounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 && !(dv.lbounds[cur_dep_dim] == 0 && dv.ubounds[cur_dep_dim] == 0)) - ub = posInfinity; - } - } - } - dv.lbounds[dep_dim] = lb; - dv.ubounds[dep_dim] = ub; - } - } - j->second = dvs; - } - else { - // dependence from skewed statement to unskewed statement becomes jumbled, - // put distance value at skewed dimension to unknown - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - } - j->second = dvs; - } - for (int i = 0; i < dep.vertex.size(); i++) - if (stmt_nums.find(i) == stmt_nums.end()) - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); j++) - if (stmt_nums.find(j->first) != stmt_nums.end()) { - // dependence from unskewed statement to skewed statement becomes jumbled, - // put distance value at skewed dimension to unknown - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - } - j->second = dvs; - } - } -} - - -void Loop::shift(const std::set<int> &stmt_nums, int level, int shift_amount) { - if (stmt_nums.size() == 0) - return; - - // check for sanity of parameters - int ref_stmt_num = *(stmt_nums.begin()); - for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { - if (*i < 0 || *i >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(*i)); - if (level < 1 || level > stmt[*i].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - } - - // do nothing - if (shift_amount == 0) - return; - - // set trasformation relations - for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { - int n = stmt[*i].xform.n_out(); - - Relation r(n, n); - F_And *f_root = r.add_and(); - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j), -1); - if (j == 2*level) - h.update_const(shift_amount); - } - - stmt[*i].xform = Composition(r, stmt[*i].xform); - stmt[*i].xform.simplify(); - } - - // update dependence graph - if (stmt[ref_stmt_num].loop_level[level-1].type == LoopLevelOriginal) { - int dep_dim = stmt[ref_stmt_num].loop_level[level-1].payload; - for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) - for (DependenceGraph::EdgeList::iterator j = dep.vertex[*i].second.begin(); j != dep.vertex[*i].second.end(); j++) - if (stmt_nums.find(j->first) == stmt_nums.end()) { - // dependence from shifted statement to unshifted statement - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - if (dv.lbounds[dep_dim] != -posInfinity) - dv.lbounds[dep_dim] -= shift_amount; - if (dv.ubounds[dep_dim] != posInfinity) - dv.ubounds[dep_dim] -= shift_amount; - } - } - j->second = dvs; - } - for (int i = 0; i < dep.vertex.size(); i++) - if (stmt_nums.find(i) == stmt_nums.end()) - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); j++) - if (stmt_nums.find(j->first) != stmt_nums.end()) { - // dependence from unshifted statement to shifted statement - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - if (dv.lbounds[dep_dim] != -posInfinity) - dv.lbounds[dep_dim] += shift_amount; - if (dv.ubounds[dep_dim] != posInfinity) - dv.ubounds[dep_dim] += shift_amount; - } - } - j->second = dvs; - } - } -} - - - -// bool Loop::fuse(const std::set<int> &stmt_nums, int level) { -// if (stmt_nums.size() == 0 || stmt_nums.size() == 1) -// return true; -// int dim = 2*level-1; - -// // check for sanity of parameters -// std::vector<int> ref_lex; -// for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { -// if (*i < 0 || *i >= stmt.size()) -// throw std::invalid_argument("invalid statement number " + to_string(*i)); -// if (level < 1 || level > (stmt[*i].xform.n_out()-1)/2) -// throw std::invalid_argument("invalid loop level " + to_string(level)); -// if (ref_lex.size() == 0) -// ref_lex = getLexicalOrder(*i); -// else { -// std::vector<int> lex = getLexicalOrder(*i); -// for (int j = 0; j < dim-1; j+=2) -// if (lex[j] != ref_lex[j]) -// throw std::invalid_argument("statements for fusion must be in the same level-" + to_string(level-1) + " subloop"); -// } -// } - -// // collect lexicographical order values from to-be-fused statements -// std::set<int> lex_values; -// for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { -// std::vector<int> lex = getLexicalOrder(*i); -// lex_values.insert(lex[dim-1]); -// } -// if (lex_values.size() == 1) -// return true; - -// // negative dependence would prevent fusion -// int dep_dim = xform_index[dim].first; -// for (std::set<int>::iterator i = lex_values.begin(); i != lex_values.end(); i++) { -// ref_lex[dim-1] = *i; -// std::set<int> a = getStatements(ref_lex, dim-1); -// std::set<int>::iterator j = i; -// j++; -// for (; j != lex_values.end(); j++) { -// ref_lex[dim-1] = *j; -// std::set<int> b = getStatements(ref_lex, dim-1); -// for (std::set<int>::iterator ii = a.begin(); ii != a.end(); ii++) -// for (std::set<int>::iterator jj = b.begin(); jj != b.end(); jj++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*ii, *jj); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim) && dvs[k].hasNegative(dep_dim)) -// throw loop_error("loop error: statements " + to_string(*ii) + " and " + to_string(*jj) + " cannot be fused together due to negative dependence"); -// dvs = dep.getEdge(*jj, *ii); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim) && dvs[k].hasNegative(dep_dim)) -// throw loop_error("loop error: statements " + to_string(*jj) + " and " + to_string(*ii) + " cannot be fused together due to negative dependence"); -// } -// } -// } - -// // collect all other lexicographical order values from the subloop -// // enclosing these to-be-fused loops -// std::set<int> same_loop = getStatements(ref_lex, dim-3); -// std::set<int> other_lex_values; -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// std::vector<int> lex = getLexicalOrder(*i); -// if (lex_values.find(lex[dim-1]) == lex_values.end()) -// other_lex_values.insert(lex[dim-1]); -// } - -// // update to-be-fused loops due to dependence cycle -// Graph<std::set<int>, Empty> g; -// { -// std::set<int> t; -// for (std::set<int>::iterator i = lex_values.begin(); i != lex_values.end(); i++) { -// ref_lex[dim-1] = *i; -// std::set<int> t2 = getStatements(ref_lex, dim-1); -// std::set_union(t.begin(), t.end(), t2.begin(), t2.end(), inserter(t, t.begin())); -// } -// g.insert(t); -// } -// for (std::set<int>::iterator i = other_lex_values.begin(); i != other_lex_values.end(); i++) { -// ref_lex[dim-1] = *i; -// std::set<int> t = getStatements(ref_lex, dim-1); -// g.insert(t); -// } -// for (int i = 0; i < g.vertex.size(); i++) -// for (int j = i+1; j < g.vertex.size(); j++) -// for (std::set<int>::iterator ii = g.vertex[i].first.begin(); ii != g.vertex[i].first.end(); ii++) -// for (std::set<int>::iterator jj = g.vertex[j].first.begin(); jj != g.vertex[j].first.end(); jj++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*ii, *jj); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(i, j); -// break; -// } -// dvs = dep.getEdge(*jj, *ii); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(j, i); -// break; -// } -// } -// std::vector<std::set<int> > s = g.topoSort(); -// int fused_lex_value = 0; -// for (int i = 0; i < s.size(); i++) -// if (s[i].find(0) != s[i].end()) { -// // now add additional lexicographical order values -// for (std::set<int>::iterator j = s[i].begin(); j != s[i].end(); j++) -// if (*j != 0) { -// int stmt = *(g.vertex[*j].first.begin()); -// std::vector<int> lex = getLexicalOrder(stmt); -// lex_values.insert(lex[dim-1]); -// } - -// if (s.size() > 1) { -// if (i == 0) { -// int min_lex_value; -// for (std::set<int>::iterator j = s[i+1].begin(); j != s[i+1].end(); j++) { -// int stmt = *(g.vertex[*j].first.begin()); -// std::vector<int> lex = getLexicalOrder(stmt); -// if (j == s[i+1].begin()) -// min_lex_value = lex[dim-1]; -// else if (lex[dim-1] < min_lex_value) -// min_lex_value = lex[dim-1]; -// } -// fused_lex_value = min_lex_value - 1; -// } -// else { -// int max_lex_value; -// for (std::set<int>::iterator j = s[i-1].begin(); j != s[i-1].end(); j++) { -// int stmt = *(g.vertex[*j].first.begin()); -// std::vector<int> lex = getLexicalOrder(stmt); -// if (j == s[i-1].begin()) -// max_lex_value = lex[dim-1]; -// else if (lex[dim-1] > max_lex_value) -// max_lex_value = lex[dim-1]; -// } -// fused_lex_value = max_lex_value + 1; -// } -// } - -// break; -// } - -// // sort the newly updated to-be-fused lexicographical order values -// std::vector<int> ordered_lex_values; -// for (std::set<int>::iterator i = lex_values.begin(); i != lex_values.end(); i++) -// ordered_lex_values.push_back(*i); -// std::sort(ordered_lex_values.begin(), ordered_lex_values.end()); - -// // make sure internal loops inside to-be-fused loops have the same -// // lexicographical order before and after fusion -// std::vector<std::pair<int, int> > inside_lex_range(ordered_lex_values.size()); -// for (int i = 0; i < ordered_lex_values.size(); i++) { -// ref_lex[dim-1] = ordered_lex_values[i]; -// std::set<int> the_stmts = getStatements(ref_lex, dim-1); -// std::set<int>::iterator j = the_stmts.begin(); -// std::vector<int> lex = getLexicalOrder(*j); -// int min_inside_lex_value = lex[dim+1]; -// int max_inside_lex_value = lex[dim+1]; -// j++; -// for (; j != the_stmts.end(); j++) { -// std::vector<int> lex = getLexicalOrder(*j); -// if (lex[dim+1] < min_inside_lex_value) -// min_inside_lex_value = lex[dim+1]; -// if (lex[dim+1] > max_inside_lex_value) -// max_inside_lex_value = lex[dim+1]; -// } -// inside_lex_range[i].first = min_inside_lex_value; -// inside_lex_range[i].second = max_inside_lex_value; -// } -// for (int i = 1; i < ordered_lex_values.size(); i++) -// if (inside_lex_range[i].first <= inside_lex_range[i-1].second) { -// int shift_lex_value = inside_lex_range[i-1].second - inside_lex_range[i].first + 1; -// ref_lex[dim-1] = ordered_lex_values[i]; -// ref_lex[dim+1] = inside_lex_range[i].first; -// shiftLexicalOrder(ref_lex, dim+1, shift_lex_value); -// inside_lex_range[i].first += shift_lex_value; -// inside_lex_range[i].second += shift_lex_value; -// } - -// // set lexicographical order for fused loops -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// std::vector<int> lex = getLexicalOrder(*i); -// if (lex_values.find(lex[dim-1]) != lex_values.end()) -// assign_const(stmt[*i].xform, dim-1, fused_lex_value); -// } - -// // no need to update dependence graph -// ; - -// return true; -// } - - -// bool Loop::distribute(const std::set<int> &stmt_nums, int level) { -// if (stmt_nums.size() == 0 || stmt_nums.size() == 1) -// return true; -// int dim = 2*level-1; - -// // check for sanity of parameters -// std::vector<int> ref_lex; -// for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { -// if (*i < 0 || *i >= stmt.size()) -// throw std::invalid_argument("invalid statement number " + to_string(*i)); -// if (level < 1 || level > (stmt[*i].xform.n_out()-1)/2) -// throw std::invalid_argument("invalid loop level " + to_string(level)); -// if (ref_lex.size() == 0) -// ref_lex = getLexicalOrder(*i); -// else { -// std::vector<int> lex = getLexicalOrder(*i); -// for (int j = 0; j <= dim-1; j+=2) -// if (lex[j] != ref_lex[j]) -// throw std::invalid_argument("statements for distribution must be in the same level-" + to_string(level) + " subloop"); -// } -// } - -// // find SCC in the to-be-distributed loop -// int dep_dim = xform_index[dim].first; -// std::set<int> same_loop = getStatements(ref_lex, dim-1); -// Graph<int, Empty> g; -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) -// g.insert(*i); -// for (int i = 0; i < g.vertex.size(); i++) -// for (int j = i+1; j < g.vertex.size(); j++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(g.vertex[i].first, g.vertex[j].first); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(i, j); -// break; -// } -// dvs = dep.getEdge(g.vertex[j].first, g.vertex[i].first); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(j, i); -// break; -// } -// } -// std::vector<std::set<int> > s = g.topoSort(); - -// // find statements that cannot be distributed due to dependence cycle -// Graph<std::set<int>, Empty> g2; -// for (int i = 0; i < s.size(); i++) { -// std::set<int> t; -// for (std::set<int>::iterator j = s[i].begin(); j != s[i].end(); j++) -// if (stmt_nums.find(g.vertex[*j].first) != stmt_nums.end()) -// t.insert(g.vertex[*j].first); -// if (!t.empty()) -// g2.insert(t); -// } -// for (int i = 0; i < g2.vertex.size(); i++) -// for (int j = i+1; j < g2.vertex.size(); j++) -// for (std::set<int>::iterator ii = g2.vertex[i].first.begin(); ii != g2.vertex[i].first.end(); ii++) -// for (std::set<int>::iterator jj = g2.vertex[j].first.begin(); jj != g2.vertex[j].first.end(); jj++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*ii, *jj); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g2.connect(i, j); -// break; -// } -// dvs = dep.getEdge(*jj, *ii); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g2.connect(j, i); -// break; -// } -// } -// std::vector<std::set<int> > s2 = g2.topoSort(); - -// // nothing to distribute -// if (s2.size() == 1) -// throw loop_error("loop error: no statement can be distributed due to dependence cycle"); - -// std::vector<std::set<int> > s3; -// for (int i = 0; i < s2.size(); i++) { -// std::set<int> t; -// for (std::set<int>::iterator j = s2[i].begin(); j != s2[i].end(); j++) -// std::set_union(t.begin(), t.end(), g2.vertex[*j].first.begin(), g2.vertex[*j].first.end(), inserter(t, t.begin())); -// s3.push_back(t); -// } - -// // associate other affected statements with the right distributed statements -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) -// if (stmt_nums.find(*i) == stmt_nums.end()) { -// bool is_inserted = false; -// int potential_insertion_point = 0; -// for (int j = 0; j < s3.size(); j++) { -// for (std::set<int>::iterator k = s3[j].begin(); k != s3[j].end(); k++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*i, *k); -// for (int kk = 0; kk < dvs.size(); kk++) -// if (dvs[kk].isCarried(dep_dim)) { -// s3[j].insert(*i); -// is_inserted = true; -// break; -// } -// dvs = dep.getEdge(*k, *i); -// for (int kk = 0; kk < dvs.size(); kk++) -// if (dvs[kk].isCarried(dep_dim)) -// potential_insertion_point = j; -// } -// if (is_inserted) -// break; -// } - -// if (!is_inserted) -// s3[potential_insertion_point].insert(*i); -// } - -// // set lexicographical order after distribution -// int order = ref_lex[dim-1]; -// shiftLexicalOrder(ref_lex, dim-1, s3.size()-1); -// for (std::vector<std::set<int> >::iterator i = s3.begin(); i != s3.end(); i++) { -// for (std::set<int>::iterator j = (*i).begin(); j != (*i).end(); j++) -// assign_const(stmt[*j].xform, dim-1, order); -// order++; -// } - -// // no need to update dependence graph -// ; - -// return true; -// } - - - - - - - - diff --git a/loop_cuda.cc b/loop_cuda.cc deleted file mode 100644 index a23990d..0000000 --- a/loop_cuda.cc +++ /dev/null @@ -1,2123 +0,0 @@ -/***************************************************************************** - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - Cudaize methods - - Notes: - - History: - 1/7/10 Created by Gabe Rudy by migrating code from loop.cc - 31/1/11 Modified by Protonu Basu -*****************************************************************************/ - -#include <code_gen/code_gen.h> -#include <code_gen/CG_stringBuilder.h> -#include <code_gen/output_repr.h> -#include <code_gen/CG_outputRepr.h> -#include "loop_cuda.hh" -#include "loop.hh" -#include <math.h> -#include <useful.h> -#include "omegatools.hh" -#include "ir_cudasuif.hh" -#include "ir_suif.hh" -#include "ir_suif_utils.hh" -#include "chill_error.hh" -#include <vector> - -using namespace omega; -char *k_cuda_texture_memory; //protonu--added to track texture memory type -char *k_cuda_constant_memory; //protonu--added to track constant memory type -//extern char *omega::k_cuda_texture_memory; //protonu--added to track texture memory type -extern char *omega::k_ocg_comment; - - -static int cudaDebug; -class CudaStaticInit{ public: CudaStaticInit(){ cudaDebug=0; //Change this to 1 for debug -}}; -static CudaStaticInit junkInitInstance__; - - - -std::string& upcase(std::string& s) -{ - for(int i=0; i<s.size(); i++) - s[i] = toupper(s[i]); - return s; -} - -void printVs(const std::vector<std::string>& curOrder){ - if(!cudaDebug) return; - for(int i=0; i<curOrder.size(); i++){ - if(i>0) - printf(","); - printf("%s", curOrder[i].c_str()); - } - printf("\n"); -} - -void printVS(const std::vector<std::string>& curOrder){ - //if(!cudaDebug) return; - for(int i=0; i<curOrder.size(); i++){ - if(i>0) - printf(","); - printf("%s", curOrder[i].c_str()); - } - printf("\n"); -} - -LoopCuda::~LoopCuda() { - const int m = stmt.size(); - for (int i = 0; i < m; i++) - stmt[i].code->clear(); -} - -bool LoopCuda::symbolExists(std::string s){ - if(symtab->lookup_sym(s.c_str(), SYM_VAR, false)) - return true; - if(globals->lookup_sym(s.c_str(), SYM_VAR, false)) - return true; - for(int i=0; i<idxNames.size(); i++) - for(int j=0; j<idxNames[i].size(); j++) - if(strcmp(idxNames[i][j].c_str(), s.c_str()) == 0) - return true; - return false; -} - -void LoopCuda::addSync(int stmt_num, std::string idxName) -{ - //we store these and code-gen inserts sync to omega comments where stmt - //in loop that has idxName being generated - syncs.push_back(make_pair(stmt_num,idxName)); -} - -void LoopCuda::renameIndex(int stmt_num, std::string idx, std::string newName) -{ - int level = findCurLevel(stmt_num, idx); - if(idxNames.size() <= stmt_num || idxNames[stmt_num].size() < level) - throw std::runtime_error("Invalid statment number of index"); - idxNames[stmt_num][level-1] = newName.c_str(); -} - - - -enum Type{ Int }; - -struct VarDefs{ - std::string name; - std::string secondName; - operand size_expr; //array size as an expression (can be a product of other variables etc) - type_node * type; - var_sym* in_data; //Variable of array to copy data in from (before kernel call) - var_sym* out_data; //Variable of array to copy data out to (after kernel call) - int size_2d; //-1 if linearized, the constant size N, of a NxN 2D array otherwise - bool tex_mapped; //protonu-- true if this variable will be texture mapped, so no need to pass it as a argument - bool cons_mapped; //protonu-- true if this variable will be constant mem mapped, so no need to pass it as a argument - std::string original_name; //this is such a hack, to store the original name, to store a table to textures used - int var_ref_size ; -}; - -tree_node_list* wrapInIfFromMinBound(tree_node_list* then_part, tree_for* loop, base_symtab* symtab, var_sym* bound_sym) -{ - tree_node_list* ub = loop->ub_list(); - tree_node_list_iter upli(ub); - while(!upli.is_empty()){ - tree_node *node = upli.step(); - if(node->kind() == TREE_INSTR && ((tree_instr*)node)->instr()->format() == inf_rrr) - { - in_rrr* ins = (in_rrr*)((tree_instr*)node)->instr(); - //expect the structure: cpy( _ = min(grab_me, _)) - if(ins->opcode() == io_cpy && ins->src1_op().is_instr()){ - ins = (in_rrr*)ins->src1_op().instr(); - if(ins->opcode() == io_min){ - tree_node_list* tnl = new tree_node_list; - tnl->append(if_node(symtab, fold_sle(operand(bound_sym), ins->src1_op().instr()->clone()), then_part)); - return tnl; - } - } - } - } - return then_part; //Failed to go to proper loop level -} - -/** - * This would be better if it was done by a CHiLL xformation instead of at codegen - * - * state: - * for(...) - * for(...) - * cur_body - * stmt1 - * - * stm1 is in-between two loops that are going to be reduced. The - * solution is to put stmt1 at the end of cur_body but conditionally run - * in on the last step of the for loop. - * - * A CHiLL command that would work better: - * - * for(...) - * stmt0 - * for(for i=0; i<n; i++) - * cur_body - * stmt1 - * => - * for(...) - * for(for i=0; i<n; i++) - * if(i==0) stmt0 - * cur_body - * if(i==n-1) stmt1 - */ - -std::vector<tree_for*> findCommentedFors(const char* index, tree_node_list* tnl){ - std::vector<tree_for *> result; - - tree_node_list_iter iter(tnl); - bool next_loop_ok = false; - while (!iter.is_empty()) { - tree_node *tn = iter.step(); - if (tn->kind() == TREE_INSTR && ((tree_instr*)tn)->instr()->opcode() == io_mrk) - { - instruction* inst = ((tree_instr*)tn)->instr(); - std::string comment; - if ((inst->peek_annote(k_ocg_comment) != NULL)) - { - immed_list *data = (immed_list *)(inst->peek_annote(k_ocg_comment)); - immed_list_iter data_iter(data); - if(!data_iter.is_empty()){ - immed first_immed = data_iter.step(); - if(first_immed.kind() == im_string) - comment = first_immed.string(); - } - } - if(comment.find("~cuda~") != std::string::npos - && comment.find("preferredIdx: ") != std::string::npos){ - std::string idx = comment.substr(comment.find("preferredIdx: ")+14,std::string::npos); - if(idx.find(" ") != std::string::npos) - idx = idx.substr(0,idx.find(" ")); - if(strcmp(idx.c_str(),index) == 0) - next_loop_ok = true; - } - } - if (tn->kind() == TREE_FOR){ - if(next_loop_ok){ - //printf("found loop %s\n", static_cast<tree_for *>(tn)->index()->name()); - result.push_back(static_cast<tree_for *>(tn)); - } - else{ - //printf("looking down for loop %s\n", static_cast<tree_for *>(tn)->index()->name()); - std::vector<tree_for*> t = findCommentedFors(index, static_cast<tree_for *>(tn)->body()); - std::copy(t.begin(), t.end(), back_inserter(result)); - } - next_loop_ok = false; - } - if (tn->kind() == TREE_IF) { - //printf("looking down if\n"); - tree_if *tni = static_cast<tree_if *>(tn); - std::vector<tree_for*> t = findCommentedFors(index, tni->then_part()); - std::copy(t.begin(), t.end(), back_inserter(result)); - } - } - - return result; -} - -tree_node_list* forReduce(tree_for* loop, var_sym* reduceIndex, proc_symtab* proc_syms) -{ - //We did the replacements all at once with recursiveFindPreferedIdxs - //replacements r; - //r.oldsyms.append(loop->index()); - //r.newsyms.append(reduceIndex); - //tree_for* new_loop = (tree_for*)loop->clone_helper(&r, true); - tree_for* new_loop = loop; - - //return body one loops in - tree_node_list* tnl = loop_body_at_level(new_loop, 1); - //wrap in conditional if necessary - tnl = wrapInIfFromMinBound(tnl, new_loop, proc_syms, reduceIndex); - return tnl; -} - -void recursiveFindRefs(tree_node_list* code, proc_symtab* proc_syms, replacements* r) -{ - if(code->parent() && code->scope()->is_block()) - ((block_symtab*)code->scope())->find_exposed_refs(proc_syms, r); - tree_node_list_iter tnli(code); - while (!tnli.is_empty()) { - tree_node *node = tnli.step(); - //printf("node kind: %d\n", node->kind()); - if(node->is_instr()) - { - tree_instr* t_instr = (tree_instr*)node; - t_instr->find_exposed_refs(proc_syms, r); - } - if(node->is_block()){ - recursiveFindRefs(static_cast<tree_block *>(node)->body(), proc_syms, r); - } - else if(node->is_for()){ - tree_for* tn_for = static_cast<tree_for *>(node); - //Find refs in statemetns and body - tn_for->find_exposed_refs(proc_syms, r); - //recursiveFindRefs(tn_for->body(), proc_syms, r); - } - } -} - -tree_node_list* recursiveFindReplacePreferedIdxs(tree_node_list* code, proc_symtab* proc_syms, - proc_sym* cudaSync, func_type* unkown_func, - std::map<std::string, var_sym*>& loop_idxs) -{ - tree_node_list* tnl = new tree_node_list; - tree_node_list_iter tnli(code); - var_sym* idxSym=0; - bool sync = false; - std::vector<tree_node*> r1; - std::vector<tree_node_list*> r2; - while (!tnli.is_empty()) { - tree_node *node = tnli.step(); - //printf("node kind: %d\n", node->kind()); - if(node->is_instr()) - { - if(((tree_instr*)node)->instr()->format() == inf_rrr){ - in_rrr* inst = (in_rrr*)((tree_instr*)node)->instr(); - if(inst->opcode() == io_mrk){ - std::string comment; - if ((inst->peek_annote(k_ocg_comment) != NULL)) - { - immed_list *data = (immed_list *)(inst->peek_annote(k_ocg_comment)); - immed_list_iter data_iter(data); - if(!data_iter.is_empty()){ - immed first_immed = data_iter.step(); - if(first_immed.kind() == im_string) - comment = first_immed.string(); - } - } - if(comment.find("~cuda~") != std::string::npos - && comment.find("preferredIdx: ") != std::string::npos){ - std::string idx = comment.substr(comment.find("preferredIdx: ")+14,std::string::npos); - if(idx.find(" ") != std::string::npos) - idx = idx.substr(0,idx.find(" ")); - //printf("sym_tab preferred index: %s\n", idx.c_str()); - if(loop_idxs.find(idx) != loop_idxs.end()) - idxSym = loop_idxs.find(idx)->second; - //Get the proc variable sybol for this preferred index - if(idxSym == 0){ - idxSym = (var_sym*)proc_syms->lookup_sym(idx.c_str(), SYM_VAR, false); - //printf("idx not found: lookup %p\n", idxSym); - if(!idxSym){ - idxSym = new var_sym(type_s32, (char*)idx.c_str()); - proc_syms->add_sym(idxSym); - //printf("idx created and inserted\n"); - } - //Now insert into our map for future - loop_idxs.insert(make_pair(idx, idxSym)); - } - //See if we have a sync as well - if(comment.find("sync") != std::string::npos){ - //printf("Inserting sync after current block\n"); - sync = true; - } - } - } - } - tnl->append(node); - } - else if(node->is_block()){ - tree_block* b = static_cast<tree_block *>(node); - b->set_body(recursiveFindReplacePreferedIdxs(b->body(), proc_syms, cudaSync, unkown_func, loop_idxs)); - tnl->append(b); - } - else if(node->is_for()){ - tree_for* tn_for = static_cast<tree_for *>(node); - if(idxSym){ - //Replace the current tn_for's index variable with idxSym - //printf("replacing sym %s -> %s\n", tn_for->index()->name(), idxSym->name()); - replacements r; - r.oldsyms.append(tn_for->index()); - r.newsyms.append(idxSym); - tree_for* new_loop = (tree_for*)tn_for->clone_helper(&r, true); - idxSym = 0; //Reset for more loops in this tnl - new_loop->set_body(recursiveFindReplacePreferedIdxs(new_loop->body(), proc_syms, cudaSync, unkown_func, loop_idxs)); - tnl->append(new_loop); - - if(sync){ - in_cal *the_call = - new in_cal(type_s32, operand(), operand(new in_ldc(unkown_func->ptr_to(), operand(), immed(cudaSync))), 0); - tnl->append(new tree_instr(the_call)); - //tnl->print(); - sync = true; - } - }else{ - tn_for->set_body(recursiveFindReplacePreferedIdxs(tn_for->body(), proc_syms, cudaSync, unkown_func, loop_idxs)); - tnl->append(tn_for); - } - }else if (node->kind() == TREE_IF) { - tree_if *tni = static_cast<tree_if *>(node); - tni->set_then_part(recursiveFindReplacePreferedIdxs(tni->then_part(), proc_syms, cudaSync, unkown_func, loop_idxs)); - tnl->append(tni); - } - } - //Do this after the loop to not screw up the pointer interator - /* - for(int i=0; i<r1.size(); i++){ - swap_node_for_node_list(r1[i],r2[i]); - }*/ - return tnl; -} - -// loop_vars -> array references -// loop_idxs -> <idx_name,idx_sym> map for when we encounter a loop with a different preferredIndex -// dim_vars -> out param, fills with <old,new> var_sym pair for 2D array dimentions (messy stuff) -tree_node_list* swapVarReferences(tree_node_list* code, replacements* r, CG_suifBuilder *ocg, - std::map<std::string, var_sym*>& loop_vars, - proc_symtab *proc_syms, - std::vector< std::pair<var_sym*,var_sym*> >& dim_vars) -{ - //Iterate over every expression, looking up each variable and type - //reference used and possibly replacing it or adding it to our symbol - //table - // - //We use the built-in cloning helper methods to seriously help us with this! - - //Need to do a recursive mark - recursiveFindRefs(code, proc_syms, r); - - - //We can't rely on type_node->clone() to do the heavy lifting when the - //old type is a two dimentional array with variable upper bounds as - //that requires creating and saveing variable references to the upper - //bounds. So we do one pass over the oldtypes doing this type of - //conversion, putting results in the fixed_types map for a second pass - //to pick up. - std::map<type_node*,type_node*> fixed_types; //array_types needing their upper bound installed - type_node_list_iter tlip(&r->oldtypes); - while(!tlip.is_empty()) - { - type_node* old_tn = tlip.step(); - type_node* new_tn = 0; - type_node* base_type = old_tn; - std::vector< std::pair<var_sym*, type_node*> > variable_upper_bouneds; - if(old_tn->is_ptr()){ - while (base_type->is_array() || base_type->is_ptr()) { - if (base_type->is_array()){ - array_bound ub = ((array_type*)base_type)->upper_bound(); - if(ub.is_variable()){ - var_sym* old_ub = (var_sym*)ub.variable(); - var_sym *new_ub = proc_syms->new_unique_var(type_s32); - dim_vars.push_back(std::pair<var_sym* , var_sym*>(old_ub, new_ub)); - variable_upper_bouneds.push_back( std::pair<var_sym*, type_node*>(new_ub, base_type) ); - } - base_type = static_cast<array_type *>(base_type)->elem_type(); - } - else if (base_type->is_ptr()) - base_type = static_cast<ptr_type *>(base_type)->ref_type(); - } - } - for (int i = variable_upper_bouneds.size()-1; i >= 0; i--) { - var_sym *var_ub = variable_upper_bouneds[i].first; - type_node* old_tn = variable_upper_bouneds[i].second; - if(new_tn == 0) - new_tn = new array_type(base_type, array_bound(1), array_bound(var_ub)); - else - new_tn = new array_type(new_tn, array_bound(1), array_bound(var_ub)); - proc_syms->add_type(new_tn); - fixed_types.insert(std::pair<type_node*,type_node*>(old_tn, new_tn)); - } - if(new_tn){ - if(old_tn->is_ptr()){ - new_tn = new ptr_type(new_tn); - proc_syms->add_type(new_tn); - } - fixed_types.insert(std::pair<type_node*,type_node*>(old_tn, new_tn)); - } - } - - //Quickly look for modifiers on our our array types (__shared__ float [][]) - type_node_list_iter tliq(&r->oldtypes); - while(!tliq.is_empty()) - { - type_node* old_tn = tliq.step(); - if(old_tn->is_modifier()){ - type_node* base_type = static_cast<modifier_type *>(old_tn)->base(); - if(fixed_types.find(base_type) != fixed_types.end()){ - type_node* fixed_base = (*fixed_types.find(base_type)).second; - //printf("Fix modifier with fixed base\n"); - //This should work to copy over the annotations, but apparently doesn't work so well - type_node* new_tn = new modifier_type(static_cast<modifier_type*>(old_tn)->op(), fixed_base); - old_tn->copy_annotes(new_tn); - fixed_types.insert(std::pair<type_node*,type_node*>(old_tn, new_tn)); - } - } - } - - //Run through the types and create entries in r->newtypes but don't install - type_node_list_iter tli(&r->oldtypes); - while(!tli.is_empty()) - { - type_node* old_tn = tli.step(); - type_node* new_tn = 0; - - //If we recorded this as fixed by our special case, use that type - //instead of cloning. - if(fixed_types.find(old_tn) != fixed_types.end()){ - new_tn = (*fixed_types.find(old_tn)).second; - //printf("Reusing fixed typ %u: ", new_tn->type_id()); - }else{ - new_tn = old_tn->clone(); - //printf("Cloning type %u: ", old_tn->type_id()); - } - new_tn = proc_syms->install_type(new_tn); - - //Ok, there is a weird case where an array type that has var_sym as - //their upper bounds can't be covered fully in this loop or the - //var_sym loop, so we need special code. - /* - if(old_tn->op() == TYPE_PTR && ((ptr_type*)old_tn)->ref_type()->op() == TYPE_ARRAY){ - array_type* outer_array = (array_type*)((ptr_type*)old_tn)->ref_type(); - array_bound ub = outer_array->upper_bound(); - if(ub.is_variable()){ - var_sym* old_ub = (var_sym*)ub.variable(); - var_sym* new_ub = (var_sym*)((array_type*)((ptr_type*)new_tn)->ref_type())->upper_bound().variable(); - //r->oldsyms.append(old_ub); - fix_ub.insert(std::pair<var_sym*,array_type*>(old_ub, (array_type*)((ptr_type*)new_tn)->ref_type())); - dim_vars.push_back(std::pair<var_sym* , var_sym*>(old_ub, new_ub)); - printf("array var_sym: %p\n", new_ub); - } - if(outer_array->elem_type()->op() == TYPE_ARRAY) - { - array_type* inner_array = (array_type*)outer_array->elem_type(); - array_bound ub = inner_array->upper_bound(); - if(ub.is_variable()){ - var_sym* old_ub = (var_sym*)ub.variable(); - var_sym* new_ub = (var_sym*)((array_type*)((array_type*)((ptr_type*)new_tn)->ref_type())->elem_type())->upper_bound().variable(); - dim_vars.push_back(std::pair<var_sym* , var_sym*>(old_ub, new_ub)); - printf("array var_sym: %p\n", new_ub); - //r->oldsyms.append(old_ub); - fix_ub.insert(std::pair<var_sym*,array_type*>(old_ub, (array_type*)((array_type*)((ptr_type*)new_tn)->ref_type())->elem_type())); - } - } - } - */ - r->newtypes.append(new_tn); - } - - //printf("proc_syms symbol run through\n"); - //proc_syms->print(); - - //Run through the syms creating new copies - sym_node_list_iter snli(&r->oldsyms); - while(!snli.is_empty()) - { - sym_node *old_sn = snli.step(); - - if(loop_vars.count(std::string(old_sn->name())) > 0) - { - r->newsyms.append(loop_vars[std::string(old_sn->name())]); - //printf("def exists: %s\n", old_sn->name()); - }else{ - sym_node *new_sn = old_sn->copy(); - if(new_sn->is_var()){ - var_sym* var = (var_sym*)new_sn; - type_node* new_type = var->type()->clone_helper(r); - - //TODO: Have a tagged list of variables to make shared - //Make local 2D arrays __shared__ - if(new_type->op() == TYPE_ARRAY && ((array_type*)new_type)->elem_type()->op() == TYPE_ARRAY){ - //protonu--changes suggested by Malik - //printf("Adding __shared__ annotation to : %s\n", new_sn->name()); - //new_type = ocg->ModifyType(new_type, "__shared__"); - //proc_syms->add_type(new_type); - } - var->set_type(new_type); - } - proc_syms->add_sym(new_sn); - r->newsyms.append(new_sn); - //printf("def new: %s\n", new_sn->name()); - } - } - - //printf("proc_syms var runthrough\n"); - //proc_syms->print(); - return code->clone_helper(r); -} - -bool LoopCuda::validIndexes(int stmt, const std::vector<std::string>& idxs){ - for(int i=0; i<idxs.size(); i++){ - bool found = false; - for(int j=0; j<idxNames[stmt].size(); j++){ - if(strcmp(idxNames[stmt][j].c_str(), idxs[i].c_str()) == 0){ - found=true; - } - } - if(!found){ - return false; - } - } - return true; -} - - -bool LoopCuda::cudaize_v2(std::string kernel_name, std::map<std::string, int> array_dims, - std::vector<std::string> blockIdxs, std::vector<std::string> threadIdxs) -{ - int stmt_num = 0; - if(cudaDebug){ - printf("cudaize_v2(%s, {", kernel_name.c_str()); - //for( - printf("}, blocks={"); printVs(blockIdxs); printf("}, thread={"); printVs(threadIdxs); printf("})\n"); - } - - this->array_dims = array_dims; - if(!validIndexes(stmt_num, blockIdxs)){ - throw std::runtime_error("One of the indexes in the block list was not " - "found in the current set of indexes."); - } - if(!validIndexes(stmt_num, threadIdxs)){ - throw std::runtime_error("One of the indexes in the thread list was not " - "found in the current set of indexes."); - } - if(blockIdxs.size() ==0) - throw std::runtime_error("Cudaize: Need at least one block dimention"); - int block_level=0; - //Now, we will determine the actual size (if possible, otherwise - //complain) for the block dimentions and thread dimentions based on our - //indexes and the relations for our stmt; - for(int i=0; i<blockIdxs.size(); i++){ - int level = findCurLevel(stmt_num, blockIdxs[i]); - int ub,lb; - extractCudaUB(stmt_num,level,ub,lb); - if(lb!= 0){ - //attempt to "normalize" the loop with an in-place tile and then re-check our bounds - if(cudaDebug) printf("Cudaize: doing tile at level %d to try and normalize lower bounds\n", level); - tile(stmt_num,level,1,level,CountedTile); - idxNames[stmt_num].insert(idxNames[stmt_num].begin()+(level),"");//TODO: possibly handle this for all sibling stmts - extractCudaUB(stmt_num,level,ub,lb); - } - if(lb != 0){ - char buf[1024]; - sprintf(buf, "Cudaize: Loop at level %d does not have 0 as it's lower bound", level); - throw std::runtime_error(buf); - } - if(ub < 0){ - char buf[1024]; - sprintf(buf, "Cudaize: Loop at level %d does not have a hard upper bound", level); - throw std::runtime_error(buf); - } - if(cudaDebug) printf("block idx %s level %d lb: %d ub %d\n", blockIdxs[i].c_str(), level, lb, ub); - if(i == 0){ - block_level = level; - cu_bx = ub+1; - idxNames[stmt_num][level-1] = "bx"; - } - else if(i == 1){ - cu_by = ub+1; - idxNames[stmt_num][level-1] = "by"; - } - } - if(!cu_by) - block_level=0; - int thread_level1 = 0; - int thread_level2 = 0; - for(int i=0; i<threadIdxs.size(); i++){ - int level = findCurLevel(stmt_num, threadIdxs[i]); - int ub,lb; - extractCudaUB(stmt_num,level,ub,lb); - if(lb!= 0){ - //attempt to "normalize" the loop with an in-place tile and then re-check our bounds - if(cudaDebug) printf("Cudaize: doing tile at level %d to try and normalize lower bounds\n", level); - tile(stmt_num,level,1,level,CountedTile); - idxNames[stmt_num].insert(idxNames[stmt_num].begin()+(level),""); - extractCudaUB(stmt_num,level,ub,lb); - } - if(lb != 0){ - char buf[1024]; - sprintf(buf, "Cudaize: Loop at level %d does not have 0 as it's lower bound", level); - throw std::runtime_error(buf); - } - if(ub < 0){ - char buf[1024]; - sprintf(buf, "Cudaize: Loop at level %d does not have a hard upper bound", level); - throw std::runtime_error(buf); - } - - if(cudaDebug) printf("thread idx %s level %d lb: %d ub %d\n", threadIdxs[i].c_str(), level, lb, ub); - if(i == 0){ - thread_level1 = level; - cu_tx = ub+1; - idxNames[stmt_num][level-1] = "tx"; - } - else if(i == 1){ - thread_level2 = level; - cu_ty = ub+1; - idxNames[stmt_num][level-1] = "ty"; - } - else if(i == 2){ - cu_tz = ub+1; - idxNames[stmt_num][level-1] = "tz"; - } - } - if(!cu_ty) - thread_level1 = 0; - if(!cu_tz) - thread_level2 = 0; - - //Make changes to nonsplitlevels - const int m = stmt.size(); - for (int i = 0; i < m; i++) { - if(block_level){ - //stmt[i].nonSplitLevels.append((block_level)*2); - stmt_nonSplitLevels[i].append((block_level)*2); - } - if(thread_level1){ - //stmt[i].nonSplitLevels.append((thread_level1)*2); - stmt_nonSplitLevels[i].append((thread_level1)*2); - } - if(thread_level2){ - //stmt[i].nonSplitLevels.append((thread_level1)*2); - stmt_nonSplitLevels[i].append((thread_level1)*2); - } - } - - if(cudaDebug) { - printf("Codegen: current names: "); - printVS(idxNames[stmt_num]); - } - //Set codegen flag - code_gen_flags |= GenCudaizeV2; - - //Save array dimention sizes - this->array_dims = array_dims; - cu_kernel_name = kernel_name.c_str(); - -} - -tree_node_list* LoopCuda::cudaize_codegen_v2() -{ - //printf("cudaize codegen V2\n"); - CG_suifBuilder *ocg = dynamic_cast<CG_suifBuilder*>(ir->builder()); - if(!ocg) return false; - - //protonu--adding an annote to track texture memory type - ANNOTE(k_cuda_texture_memory, "cuda texture memory", TRUE); - ANNOTE(k_cuda_constant_memory, "cuda constant memory", TRUE); - int tex_mem_on = 0; - int cons_mem_on = 0; - - - - CG_outputRepr* repr; - std::vector<VarDefs> arrayVars; - std::vector<VarDefs> localScopedVars; - - std::vector<IR_ArrayRef *> ro_refs; - std::vector<IR_ArrayRef *> wo_refs; - std::set<std::string> uniqueRefs; - std::set<std::string> uniqueWoRefs; - //protonu--let's try a much simpler approach of a map instead - //we also keep a map for constant memories - std::map<std::string , var_sym *>tex_ref_map; - std::map<std::string , var_sym *>cons_ref_map; - - for(int j=0; j<stmt.size(); j++) - { - std::vector<IR_ArrayRef *> refs = ir->FindArrayRef(stmt[j].code); - for (int i = 0; i < refs.size(); i++) - { - //printf("ref %s wo %d\n", static_cast<const char*>(refs[i]->name()), refs[i]->is_write()); - var_sym* var = symtab->lookup_var((char*)refs[i]->name().c_str(),false); - //If the array is not a parameter, then it's a local array and we - //want to recreate it as a stack variable in the kernel as opposed to - //passing it in. - if(!var->is_param()) - continue; - if (uniqueRefs.find(refs[i]->name()) == uniqueRefs.end()) - { - uniqueRefs.insert(refs[i]->name()); - if(refs[i]->is_write()){ - uniqueWoRefs.insert(refs[i]->name()); - wo_refs.push_back(refs[i]); - } - else - ro_refs.push_back(refs[i]); - } - if (refs[i]->is_write() && uniqueWoRefs.find(refs[i]->name()) == uniqueWoRefs.end()){ - uniqueWoRefs.insert(refs[i]->name()); - wo_refs.push_back(refs[i]); - //printf("adding %s to wo\n", static_cast<const char*>(refs[i]->name())); - } - } - } - - // printf("reading from array "); - // for(int i=0; i<ro_refs.size(); i++) - // printf("'%s' ", ro_refs[i]->name().c_str()); - // printf("and writting to array "); - // for(int i=0; i<wo_refs.size(); i++) - // printf("'%s' ", wo_refs[i]->name().c_str()); - // printf("\n"); - - const char* gridName = "dimGrid"; - const char* blockName = "dimBlock"; - - //TODO: Could allow for array_dims_vars to be a mapping from array - //references to to variable names that define their length. - var_sym* dim1 = 0; - var_sym* dim2 = 0; - - for(int i=0; i<wo_refs.size(); i++) - { - //TODO: Currently assume all arrays are floats of one or two dimentions - var_sym* outArray = 0; - std::string name = wo_refs[i]->name(); - outArray = symtab->lookup_var((char*)name.c_str(),false); - - VarDefs v; - v.size_2d = -1; - char buf[32]; - snprintf(buf, 32, "devO%dPtr", i+1); - v.name = buf; - if(outArray->type()->is_ptr()) - if(((ptr_type *)(outArray->type()))->ref_type()->is_array()) - v.type = ((array_type *)(((ptr_type *)(outArray->type()))->ref_type()))->elem_type(); - else - v.type = ((ptr_type *)(outArray->type()))->ref_type(); - else - v.type = type_f32; - v.tex_mapped = false; - v.cons_mapped = false; - v.original_name = wo_refs[i]->name(); - //Size of the array = dim1 * dim2 * num bytes of our array type - - //If our input array is 2D (non-linearized), we want the actual - //dimentions of the array - CG_outputRepr* size; - //Lookup in array_dims - std::map<std::string, int>::iterator it = array_dims.find(name.c_str()); - if(outArray->type()->is_ptr() && outArray->type()->ref_type(0)->is_array()) - { - array_type* t = (array_type*)outArray->type()->ref_type(0); - v.size_2d = t->upper_bound().constant()+1; - printf("Detected 2D array sized of %d for %s\n", v.size_2d, (char*)wo_refs[i]->name().c_str()); - size = ocg->CreateInt(v.size_2d * v.size_2d); - }else if(it != array_dims.end()){ - int ref_size = it->second; - v.var_ref_size = ref_size; - size = ocg->CreateInt(ref_size); - } - else{ - if(dim1){ - size = ocg->CreateTimes(new CG_suifRepr(operand(dim1)), - new CG_suifRepr(operand(dim2))); - }else{ - char buf[1024]; - sprintf(buf, "CudaizeCodeGen: Array reference %s does not have a " - "detectable size or specififed dimentions", name.c_str()); - throw std::runtime_error(buf); - } - } - v.size_expr = operand(static_cast<CG_suifRepr*>(ocg->CreateTimes( - size, - ocg->CreateInt(v.type->size()/8)))->GetExpression()); - v.in_data = 0; - v.out_data = outArray; - //Check for in ro_refs and remove it at this point - std::vector<IR_ArrayRef *>::iterator it_; - for(it_ = ro_refs.begin(); it_ != ro_refs.end(); it_++) - { - if((*it_)->name() == wo_refs[i]->name()){ - break; - } - } - if(it_ != ro_refs.end()) - { - v.in_data = outArray; - ro_refs.erase(it_); - } - - arrayVars.push_back(v); - - } - - //protonu-- assuming that all texture mapped memories were originally read only mems - //there should be safety checks for that, will implement those later - - int cs_ref_size = 0; - - for(int i=0; i<ro_refs.size(); i++) - { - var_sym* inArray = 0; - std::string name = ro_refs[i]->name(); - inArray = symtab->lookup_var((char*)name.c_str(),false); - VarDefs v; - v.size_2d = -1; - char buf[32]; - snprintf(buf, 32, "devI%dPtr", i+1); - v.name = buf; - if(inArray->type()->is_ptr()) - if(((ptr_type *)(inArray->type()))->ref_type()->is_array()) - v.type = ((array_type *)(((ptr_type *)(inArray->type()))->ref_type()))->elem_type(); - else - v.type = ((ptr_type *)(inArray->type()))->ref_type(); - else - v.type = type_f32; - v.tex_mapped = false; - v.cons_mapped = false; - v.original_name = ro_refs[i]->name(); - if ( texture != NULL) - v.tex_mapped = (texture->is_array_tex_mapped(name.c_str()))? true:false; //protonu-track tex mapped vars - if (v.tex_mapped){ - printf("this variable %s is mapped to texture memory", name.c_str()); - } - if ( constant_mem != NULL) - v.cons_mapped = (constant_mem->is_array_cons_mapped(name.c_str()))? true:false; //protonu-track tex mapped vars - if (v.cons_mapped){ - printf("this variable %s is mapped to constant memory", name.c_str()); - } - - //Size of the array = dim1 * dim2 * num bytes of our array type - - //If our input array is 2D (non-linearized), we want the actual - //dimentions of the array (as it might be less than cu_n - CG_outputRepr* size; - //Lookup in array_dims - std::map<std::string, int>::iterator it = array_dims.find(name.c_str()); - int ref_size = 0; - if(inArray->type()->is_ptr() && inArray->type()->ref_type(0)->is_array()) - { - array_type* t = (array_type*)inArray->type()->ref_type(0); - v.size_2d = t->upper_bound().constant()+1; - printf("Detected 2D array sized of %d for %s\n", v.size_2d, (char*)ro_refs[i]->name().c_str()); - size = ocg->CreateInt(v.size_2d * v.size_2d); - }else if(it != array_dims.end()){ - ref_size = it->second; - v.var_ref_size = ref_size; - size = ocg->CreateInt(ref_size); - }else{ - if(dim1){ - size = ocg->CreateTimes(new CG_suifRepr(operand(dim1)), - new CG_suifRepr(operand(dim2))); - }else{ - char buf[1024]; - sprintf(buf, "CudaizeCodeGen: Array reference %s does not have a " - "detectable size or specififed dimentions", name.c_str()); - throw std::runtime_error(buf); - } - } - - - - v.size_expr = operand(static_cast<CG_suifRepr*>(ocg->CreateTimes( - size, - ocg->CreateInt(v.type->size()/8)))->GetExpression()); - - v.in_data = inArray; - v.out_data = 0; - arrayVars.push_back(v); - } - - - if(arrayVars.size() < 2) - { - fprintf(stderr, "cudaize error: Did not find two arrays being accessed\n"); - return false; - } - - //protonu--debugging tool--the printf statement - //tex_mem_on signals use of tex mem - for(int i=0; i<arrayVars.size(); i++) - { - //printf("var name %s, tex_mem used %s\n", arrayVars[i].name.c_str(), (arrayVars[i].tex_mapped)?"true":"false"); - if (arrayVars[i].tex_mapped ) tex_mem_on ++; - if (arrayVars[i].cons_mapped ) cons_mem_on ++; - } - - //Add CUDA function extern prototypes and function types - func_type* unkown_func = new func_type(type_s32); //function on unkown args that returns a i32 - unkown_func = (func_type*)symtab->install_type(unkown_func); - func_type* void_func = new func_type(type_void); //function on unkown args that returns a void - void_func = (func_type*)globals->install_type(void_func); - func_type* float_func = new func_type(type_f32); //function on unkown args that returns a float - float_func = (func_type*)globals->install_type(float_func); - - type_node* result = ocg->ModifyType(type_void, "__global__"); - result = globals->install_type(result); - func_type* kernel_type = new func_type(result); //function returns a '__global__ void' - - int numArgs = arrayVars.size() + (dim1 ? 2 : 0) + localScopedVars.size(); - //protonu--need to account for texture memory here, reduce the #args - if( tex_mem_on ) numArgs -= tex_mem_on; - if( cons_mem_on ) numArgs -= cons_mem_on; - kernel_type->set_num_args(numArgs); - int argCount = 0; - for(int i=0; i<arrayVars.size(); i++) - { - type_node* fptr; - if(arrayVars[i].in_data) - fptr = arrayVars[i].in_data->type()->clone(); - else - fptr = arrayVars[i].out_data->type()->clone(); - //protonu--skip this for texture mems - if( arrayVars[i].tex_mapped != true && arrayVars[i].cons_mapped !=true ) - kernel_type->set_arg_type(argCount++, fptr); - } - if(dim1){ - kernel_type->set_arg_type(argCount++, type_s32); //width x height dimentions - kernel_type->set_arg_type(argCount++, type_s32); - } - kernel_type = (func_type*)globals->install_type(kernel_type); - - proc_sym* cudaMalloc = globals->new_proc(unkown_func, src_c, "cudaMalloc"); - proc_sym* cudaMemcpy = globals->new_proc(unkown_func, src_c, "cudaMemcpy"); - proc_sym* cudaFree = globals->new_proc(unkown_func, src_c, "cudaFree"); - proc_sym* cudaSync = globals->new_proc(void_func, src_c, "__syncthreads"); - proc_sym* cudaBind = globals->new_proc(unkown_func, src_c, "cudaBindTexture"); - proc_sym* cudaMemcpySym = globals->new_proc(unkown_func, src_c, "cudaMemcpyToSymbol"); - - - //protonu-removing Gabe's function, introducing mine, this is pretty cosmetic - //proc_sym* cudaFetch = globals->new_proc(float_func, src_c, "tex1Dfetch"); - proc_sym* tex1D = globals->new_proc(float_func, src_c, "tex1Dfetch"); - - var_sym *cudaMemcpyHostToDevice = new var_sym(type_s32, "cudaMemcpyHostToDevice"); - var_sym *cudaMemcpyDeviceToHost = new var_sym(type_s32, "cudaMemcpyDeviceToHost"); - cudaMemcpyDeviceToHost->set_param(); - cudaMemcpyHostToDevice->set_param(); - globals->add_sym(cudaMemcpyHostToDevice); - globals->add_sym(cudaMemcpyDeviceToHost); - - //protonu--adding the bool tex_mem to the structure struct_type - //to bypass the re-naming of struct texture, this is a hack fix - struct_type* texType = new struct_type(TYPE_GROUP, 0, "texture<float, 1, cudaReadModeElementType>", 0, true); - immed_list *iml_tex = new immed_list; - iml_tex->append(immed("texture memory")); - texType->append_annote(k_cuda_texture_memory, iml_tex); - //protonu--end my changes - texType = (struct_type*)globals->install_type(texType); - //protonu--should register the locals later on - //when we do the bind operation - //var_sym* texRef = new var_sym(texType, "texRef"); - //globals->add_sym(texRef); - - //Add our mallocs (and input array memcpys) - for(int i=0; i<arrayVars.size(); i++) - { - //protonu--check if the variable is not a tex-mapped variable. If it is tex mapped - // allow a malloc and memcpy operation, and a bind, but only if it is tex mapped, but dont call - // the kernel with it as an argument. - - //Make a pointer of type a[i].type - //type_node* fptr = new ptr_type(arrayVars[i].type->clone()); - //protonu--temporary change - type_node* fptr = new ptr_type(arrayVars[i].type); - fptr = symtab->install_type(fptr); - var_sym *dvs = new var_sym(fptr, const_cast<char*>( - arrayVars[i].name.c_str())); - dvs->set_addr_taken(); - symtab->add_sym(dvs); - - //cudaMalloc args - //protonu--no cudaMalloc required for constant memory - tree_node_list* tnl = new tree_node_list; - if(arrayVars[i].cons_mapped != true ) - { - in_cal *the_call = - new in_cal(type_s32, operand(), operand(new in_ldc(unkown_func->ptr_to(), operand(), immed(cudaMalloc))), 2); - the_call->set_argument(0, operand(new in_ldc(type_void->ptr_to()->ptr_to(), operand(), immed(dvs)))); - the_call->set_argument(1, arrayVars[i].size_expr); - - tnl->append(new tree_instr(the_call)); - setup_code = ocg->StmtListAppend(setup_code, - new CG_suifRepr(tnl)); - } - if(arrayVars[i].in_data) - { - //cudaMemcpy args - //protonu-- no cudaMemcpy required for constant memory - if ( arrayVars[i].cons_mapped != true ) - { - in_cal *the_call = - new in_cal(type_s32, operand(), operand(new in_ldc(unkown_func->ptr_to(), operand(), immed(cudaMemcpy))), 4); - the_call->set_argument(0, operand(dvs)); - the_call->set_argument(1, operand(arrayVars[i].in_data)); - the_call->set_argument(2, arrayVars[i].size_expr.clone()); - the_call->set_argument(3, operand(cudaMemcpyHostToDevice)); - - tnl = new tree_node_list; - tnl->append(new tree_instr(the_call)); - setup_code = ocg->StmtListAppend(setup_code, - new CG_suifRepr(tnl)); - } - - //protonu--check if the arrayvar is tex mapped - if(arrayVars[i].tex_mapped == true) - { - //Need a texture reference variable - char buf[32]; - snprintf(buf, 32, "tex%dRef", i+1); - arrayVars[i].secondName = buf; - - var_sym* texRef = new var_sym(texType, buf); - //printf("\n putting in %s\n", arrayVars[i].original_name.c_str()); - tex_ref_map[arrayVars[i].original_name] = texRef; - globals->add_sym(texRef); - //protonu--added the above two lines - - in_cal *the_call = - new in_cal(type_s32, operand(), operand(new in_ldc(unkown_func->ptr_to(), operand(), immed(cudaBind))), 4); - in_ldc *ins = new in_ldc(type_s32, operand(), immed(0)); - the_call->set_argument(0, operand(ins)); - the_call->set_argument(1, operand(texRef));//protonu--change to add the new sym - the_call->set_argument(2, operand(dvs)); - the_call->set_argument(3, arrayVars[i].size_expr.clone()); - - tnl = new tree_node_list; - tnl->append(new tree_instr(the_call)); - setup_code = ocg->StmtListAppend(setup_code, - new CG_suifRepr(tnl)); - } - - //protonu--if arrayvar is mapped to constant memory - if(arrayVars[i].cons_mapped == true) - { - char buf[32]; - snprintf(buf, 32, "cs%dRef", i+1); - //arrayVars[i].secondName = buf; - array_bound low (0); - array_bound high (arrayVars[i].var_ref_size -1); - array_type *arr = new array_type(arrayVars[i].type,low, high); - type_node* cons_arr = ocg->ModifyType(arr, "__device__ __constant__"); - cons_arr = globals->install_type(cons_arr); - var_sym* consRef = new var_sym(cons_arr, buf); - cons_ref_map[arrayVars[i].original_name] = consRef; - globals->add_sym(consRef); - - - - in_cal *the_call = - new in_cal(type_s32, operand(), operand(new in_ldc(unkown_func->ptr_to(), operand(), immed(cudaMemcpySym))), 3); - the_call->set_argument(0, operand(new in_ldc(type_void->ptr_to(), operand(), immed(consRef)))); - the_call->set_argument(1, operand(arrayVars[i].in_data)); - the_call->set_argument(2, arrayVars[i].size_expr.clone()); - - tnl = new tree_node_list; - tnl->append(new tree_instr(the_call)); - setup_code = ocg->StmtListAppend(setup_code, - new CG_suifRepr(tnl)); - - } - } - } - - //Build dimGrid dim3 variables based on loop dimentions and ti/tj - char blockD1[120]; - char blockD2[120]; - if(dim1){ - snprintf(blockD1, 120, "%s/%d", dim1->name(), cu_tx); - snprintf(blockD2, 120, "%s/%d", dim2->name(), cu_ty); - }else{ - snprintf(blockD1, 120, "%d", cu_bx); - snprintf(blockD2, 120, "%d", cu_by); - //snprintf(blockD1, 120, "%d/%d", cu_nx, cu_tx); - //snprintf(blockD2, 120, "%d/%d", cu_ny, cu_ty); - } - repr = ocg->CreateDim3(immed((char*)gridName), - immed(blockD1), - immed(blockD2)); - setup_code = ocg->StmtListAppend(setup_code, repr); - - repr = ocg->CreateDim3(immed((char*)blockName), immed(cu_tx),immed(cu_ty)); - - if(cu_tz > 1) - repr = ocg->CreateDim3(immed((char*)blockName), immed(cu_tx), immed(cu_ty), immed(cu_tz)); - else - repr = ocg->CreateDim3(immed((char*)blockName), immed(cu_tx), immed(cu_ty)); - setup_code = ocg->StmtListAppend(setup_code, repr); - - //call kernel function with name loop_name - //like: transpose_k<<<dimGrid,dimBlock>>>(devOPtr, devIPtr , width, height); - char dims[120]; - snprintf(dims,120,"<<<%s,%s>>>",gridName, blockName); - immed_list *iml = new immed_list; - iml->append(immed((char*)cu_kernel_name.c_str())); - iml->append(immed(dims)); - //printf("%s %s\n", static_cast<const char*>(cu_kernel_name), dims); - for(int i=0; i<arrayVars.size(); i++) - //Throw in a type cast if our kernel takes 2D array notation - //like (float(*) [1024]) - { - //protonu--throwing in another hack to stop the caller from passing tex mapped - //vars to the kernel. - if(arrayVars[i].tex_mapped == true || arrayVars[i].cons_mapped == true ) - continue; - if(arrayVars[i].size_2d >= 0) - { - snprintf(dims,120,"(float(*) [%d])%s", arrayVars[i].size_2d, - const_cast<char*>(arrayVars[i].name.c_str())); - //printf("%d %s\n", i, dims); - iml->append(immed(dims)); - }else{ - //printf("%d %s\n", i, static_cast<const char*>(arrayVars[i].name)); - iml->append(immed(const_cast<char*>( - arrayVars[i].name.c_str()))); - } - } - if(dim1){ - iml->append(immed(dim1)); - iml->append(immed(dim2)); - } - repr = ocg->CreateKernel(iml);//kernel call - setup_code = ocg->StmtListAppend(setup_code, repr); - - //cuda free variables - for(int i=0; i<arrayVars.size(); i++) - { - if(arrayVars[i].out_data) - { - //cudaMemcpy args - in_cal *the_call = - new in_cal(type_s32, operand(), operand(new in_ldc(unkown_func->ptr_to(), operand(), immed(cudaMemcpy))), 4); - the_call->set_argument(0, operand(arrayVars[i].out_data)); - the_call->set_argument(1, operand(symtab->lookup_var(const_cast<char*>( - arrayVars[i].name.c_str())))); - the_call->set_argument(2, arrayVars[i].size_expr.clone()); - the_call->set_argument(3, operand(cudaMemcpyDeviceToHost)); - - tree_node_list* tnl = new tree_node_list; - tnl->append(new tree_instr(the_call)); - teardown_code = ocg->StmtListAppend(teardown_code, - new CG_suifRepr(tnl)); - } - - in_cal *the_call = - new in_cal(type_s32, operand(), operand(new in_ldc(unkown_func->ptr_to(), operand(), immed(cudaFree))), 1); - the_call->set_argument(0, operand(symtab->lookup_var(const_cast<char*>( - arrayVars[i].name.c_str())))); - - tree_node_list* tnl = new tree_node_list; - tnl->append(new tree_instr(the_call)); - teardown_code = ocg->StmtListAppend(teardown_code, - new CG_suifRepr(tnl)); - } - - // --------------- - // BUILD THE KERNEL - // --------------- - - //Extract out kernel body - tree_node_list* code = getCode(); - //Get rid of wrapper if that original() added - if(code->head()->contents->kind() == TREE_IF) - { - tree_if* ifn = (tree_if*)code->head()->contents; - code = ifn->then_part(); - } - - //Create kernel function body - proc_sym *new_psym = globals->new_proc(kernel_type, src_c, (char*)cu_kernel_name.c_str()); - proc_symtab *new_proc_syms = new proc_symtab(new_psym->name()); - globals->add_child(new_proc_syms); - - //Add Params - std::map<std::string, var_sym*> loop_vars; - //In-Out arrays - type_node* fptr; - for(int i=0; i<arrayVars.size(); i++) - { - if(arrayVars[i].in_data) - //fptr = arrayVars[i].in_data->type()->clone(); - fptr = arrayVars[i].in_data->type(); - else - //fptr = arrayVars[i].out_data->type()->clone(); - fptr = arrayVars[i].out_data->type(); - fptr = new_proc_syms->install_type(fptr); - std::string name = arrayVars[i].in_data ? arrayVars[i].in_data->name() : arrayVars[i].out_data->name(); - var_sym* sym = new var_sym(fptr, arrayVars[i].in_data ? arrayVars[i].in_data->name() : arrayVars[i].out_data->name()); - //protonu--adding a check to ensure that texture memories are not passed in as arguments - if(arrayVars[i].tex_mapped != true && arrayVars[i].cons_mapped !=true ) - { - sym->set_param(); - new_proc_syms->params()->append(sym); - new_proc_syms->add_sym(sym);//protonu--added to suppress the addition of the redundant var in the kernel - } - if (arrayVars[i].cons_mapped == true) - { - sym->set_param(); - new_proc_syms->add_sym(sym); - } - //printf("inserting name: %s\n", static_cast<const char*>(name)); - loop_vars.insert(std::pair<std::string, var_sym*>(std::string(name), sym)); - } - - if(dim1) - { - //Array dimentions - var_sym* kdim1 = new var_sym(dim1->type(), dim1->name()); - kdim1->set_param(); - new_proc_syms->add_sym(kdim1); - loop_vars.insert(std::pair<std::string, var_sym*>(std::string(dim1->name()), kdim1)); - var_sym* kdim2 = new var_sym(dim2->type(), dim2->name()); - kdim2->set_param(); - new_proc_syms->add_sym(kdim2); - loop_vars.insert(std::pair<std::string, var_sym*>(std::string(dim2->name()), kdim2)); - new_proc_syms->params()->append(kdim1); - new_proc_syms->params()->append(kdim2); - } - //Put block and thread implicit variables into scope - std::vector<var_sym *> index_syms; - /* Currently we don't use the block dimentions - var_sym* blockDim_x = new var_sym(type_s32, "blockDim.x"); - blockDim_x->set_param(); - new_proc_syms->add_sym(blockDim_x); - var_sym* blockDim_y = new var_sym(type_s32, "blockDim.y"); - blockDim_y->set_param(); - new_proc_syms->add_sym(blockDim_y); - */ - if(cu_bx > 1){ - var_sym* blockIdx_x = new var_sym(type_s32, "blockIdx.x"); - blockIdx_x->set_param(); - new_proc_syms->add_sym(blockIdx_x); - index_syms.push_back(blockIdx_x); - } - if(cu_by > 1){ - var_sym* blockIdx_y = new var_sym(type_s32, "blockIdx.y"); - blockIdx_y->set_param(); - new_proc_syms->add_sym(blockIdx_y); - index_syms.push_back(blockIdx_y); - } - if(cu_tx > 1){ - var_sym* threadIdx_x = new var_sym(type_s32, "threadIdx.x"); - threadIdx_x->set_param(); - new_proc_syms->add_sym(threadIdx_x); - index_syms.push_back(threadIdx_x); - } - if(cu_ty > 1){ - var_sym* threadIdx_y = new var_sym(type_s32, "threadIdx.y"); - threadIdx_y->set_param(); - new_proc_syms->add_sym(threadIdx_y); - index_syms.push_back(threadIdx_y); - } - - if(cu_tz > 1){ - var_sym* threadIdx_z = new var_sym(type_s32, "threadIdx.z"); - threadIdx_z->set_param(); - new_proc_syms->add_sym(threadIdx_z); - index_syms.push_back(threadIdx_z); - } - - //Figure out which loop variables will be our thread and block dimention variables - std::vector<var_sym *> loop_syms; - //Get our indexes - std::vector<const char*> indexes;// = get_loop_indexes(code,cu_num_reduce); - int threadsPos=0; - if(cu_bx > 1) - indexes.push_back("bx"); - if(cu_by > 1) - indexes.push_back("by"); - if(cu_tx > 1){ - threadsPos = indexes.size(); - indexes.push_back("tx"); - } - if(cu_ty > 1) - indexes.push_back("ty"); - if(cu_tz > 1) - indexes.push_back("tz"); - for(int i=0; i<indexes.size(); i++) - { - //printf("indexes[%d] = %s\n", i, (char*)indexes[i]); - loop_syms.push_back(new var_sym(type_s32, (char*)indexes[i])); - new_proc_syms->add_sym(loop_syms[i]); - //loop_vars.insert(std::pair<std::string, var_sym*>(std::string(indexes[i]), loop_syms[i])); - } - - //Generate this code - //int bx = blockIdx.x - //int by = blockIdx.y - //int tx = threadIdx.x - //int ty = threadIdx.y - CG_outputRepr *body=NULL; - for(int i=0; i<indexes.size(); i++){ - CG_outputRepr *lhs = new CG_suifRepr(operand(loop_syms[i])); - //body = ocg->StmtListAppend(body, ocg->CreateStmtList( - // ocg->CreateAssignment(0, lhs, new CG_suifRepr(operand(index_syms[i]))))); - body = ocg->StmtListAppend(body, ocg->StmtListAppend( - ocg->CreateAssignment(0, lhs, new CG_suifRepr(operand(index_syms[i]))), NULL)); - } - - //Get our inital code prepped for loop reduction. First we need to swap - //out internal SUIF variable references to point to the new local - //function symbol table. - std::map<std::string, var_sym*> loop_idxs; //map from idx names to their new syms - std::vector< std::pair<var_sym*, var_sym*> > dim_vars; //pair is of <old,new> var_sym (for 2D array size initializations) - replacements r; - tree_node_list* swapped = swapVarReferences(code, &r, ocg, loop_vars, new_proc_syms, dim_vars); - //printf("\n code before recursiveFindReplacePreferedIdxs :\n"); - //swapped->print(); - swapped = recursiveFindReplacePreferedIdxs(swapped, new_proc_syms, cudaSync, void_func, loop_idxs);//in-place swapping - //printf("\n code after recursiveFindReplacePreferedIdxs :\n"); - //swapped->print(); - - for(int i=0; i<indexes.size(); i++){ - std::vector<tree_for*> tfs = findCommentedFors(indexes[i], swapped); - for(int k=0; k<tfs.size(); k++){ - //printf("replacing %p tfs for index %s\n", tfs[k], indexes[i]); - tree_node_list* newBlock = forReduce(tfs[k], loop_idxs[indexes[i]], new_proc_syms); - //newBlock->print(); - swap_node_for_node_list(tfs[k], newBlock); - //printf("AFTER SWAP\n"); newBlock->print(); - } - } - //printf("AFTER REDUCE\n"); swapped->print(); - - if(static_cast<const IR_cudasuifCode *>(ir)->init_code()){ - tree_node_list* orig_init_code = static_cast<CG_suifRepr *>(static_cast<const IR_cudasuifCode *>(ir)->init_code())->GetCode(); - for(int i=0; i<dim_vars.size(); i++){ - //We have a map of var_sym from the original function body and we know - //that these var_syms have initialization statements which define the - //array size. We need to mimic these initialization statements. - - //First find the assignment and pull out the constant initialization - //value - int value = -1; - tree_node_list_iter tnli(orig_init_code); - while (!tnli.is_empty()) { - tree_node *node = tnli.step(); - if(node->kind() == TREE_INSTR && ((tree_instr*)node)->instr()->format() == inf_rrr) - { - in_rrr* inst = (in_rrr*)((tree_instr*)node)->instr(); - //expect the structure: cpy( _ = min(grab_me, _)) - if(inst->opcode() == io_cpy && inst->dst_op().is_symbol()){ - //printf("looking at instruction: "); - //inst->print(); - var_sym* dest = inst->dst_op().symbol(); - if(dest == dim_vars[i].first) - { - if(inst->src1_op().is_instr() && inst->src1_op().instr()->format() == inf_ldc){ - value = ((in_ldc*)inst->src1_op().instr())->value().integer(); - } - } - } - } - } - if(value < 0){ - fprintf(stderr, "ERROR: Could not find initializing statement for variable used in upper_bound of array type"); - } - CG_outputRepr *lhs = new CG_suifRepr(operand(dim_vars[i].second)); - //body = ocg->StmtListAppend(body, ocg->CreateStmtList(ocg->CreateAssignment(0, lhs, ocg->CreateInt(value)))); - body = ocg->StmtListAppend(body, ocg->StmtListAppend(ocg->CreateAssignment(0, lhs, ocg->CreateInt(value)), NULL)); - } - } - - - body = ocg->StmtListAppend(body, new CG_suifRepr(swapped)); - - //protonu--lets try creating our function definiton here - var_sym *tsym = NULL; - - - std::vector<IR_ArrayRef *> refs = ir->FindArrayRef(body); - for(int i=0; i<refs.size(); i++) - { - //check if the array is tex mapped - if(texture != NULL && texture->is_array_tex_mapped(refs[i]->name().c_str())) - { - //protonu--our new tex lookup function - in_cal *tex_lookup = - new in_cal(type_f32, operand(), operand(new in_ldc(float_func->ptr_to(), operand(), immed(tex1D))), 2); - - //printf("name of the array to be mapped is %s\n", refs[i]->name().c_str()); - tsym = tex_ref_map[refs[i]->name()]; - tex_lookup->set_argument(0, operand(tsym)); - - - int array_dims = ((IR_suifArrayRef *)refs[i])->ia_->dims(); - - if (array_dims == 1){ - tex_lookup->set_argument(1, ((IR_suifArrayRef *)refs[i])->ia_->index(0).clone()); - }else if (array_dims > 2) { - printf(" \n we don't handle more than 2D arrays mapped to textures yet\n"); - }else if (array_dims == 2) { - - IR_ArraySymbol *sym = refs[i]->symbol(); - CG_outputRepr *sz = sym->size(1); - delete sym; // free the wrapper object only - // find the builder ocg - CG_outputRepr *expr = ocg->CreateTimes(sz->clone(),refs[i]->index(0)); - delete sz; // free the wrapper object only - expr = ocg->CreatePlus(expr, refs[i]->index(1)); - // expr holds the 1D access expression and take it out - tex_lookup->set_argument(1, ((CG_suifRepr *)expr)->GetExpression()); - } - - //using chun's function to replace the array look up with the function call - ((IR_suifCode *)ir)->ReplaceExpression(refs[i] , new CG_suifRepr(operand(tex_lookup))); - } - - } - - - tsym = NULL; - //protonu--now let's try what we did above for constant memory - for(int i=0; i<refs.size(); i++) - { - //check if the array is tex mapped - if(constant_mem != NULL && constant_mem->is_array_cons_mapped(refs[i]->name().c_str())) - { - - //printf("name of the array to be cons mapped is %s\n", refs[i]->name().c_str()); - tsym = cons_ref_map[refs[i]->name()]; - //we should create a IR_SuifArray here - IR_ArraySymbol *ar_sym = new IR_suifArraySymbol(ir,tsym); - std::vector<CG_outputRepr *> ar_index; - ar_index.push_back(((IR_suifArrayRef *)refs[i])->index(0)); - IR_ArrayRef *ar_ref = ((IR_suifCode *)ir)->CreateArrayRef(ar_sym, ar_index); - //using chun's function to replace the array look up with the function call - ((IR_suifCode *)ir)->ReplaceExpression(refs[i] , new CG_suifRepr(operand(((IR_suifArrayRef *)ar_ref)->ia_))); - - } - } - - - tree_proc *new_body = new tree_proc(static_cast<CG_suifRepr*>(body)->GetCode(), new_proc_syms); - //globals->add_child(new_proc_syms); - new_psym->set_block(new_body); - new_procs.push_back(new_psym); - - return swapped; -} - -//Order taking out dummy variables -std::vector<std::string> cleanOrder(std::vector<std::string> idxNames){ - std::vector<std::string> results; - for(int j=0; j<idxNames.size(); j++){ - if(idxNames[j].length() != 0) - results.push_back(idxNames[j]); - } - return results; -} - -//First non-dummy level in ascending order -int LoopCuda::nonDummyLevel(int stmt, int level){ - //level comes in 1-basd and should leave 1-based - for(int j=level-1; j<idxNames[stmt].size(); j++){ - if(idxNames[stmt][j].length() != 0){ - //printf("found non dummy level of %d with idx: %s when searching for %d\n", j+1, (const char*) idxNames[stmt][j], level); - return j+1; - } - } - char buf[128]; sprintf(buf, "%d", level); - throw std::runtime_error(std::string("Unable to find a non-dummy level starting from ") + std::string(buf)); -} - -int LoopCuda::findCurLevel(int stmt, std::string idx){ - for(int j=0; j<idxNames[stmt].size(); j++){ - if(strcmp(idxNames[stmt][j].c_str(),idx.c_str()) == 0) - return j+1; - } - throw std::runtime_error(std::string("Unable to find index ") + idx + std::string(" in current list of indexes")); -} - -void LoopCuda::permute_cuda(int stmt, const std::vector<std::string>& curOrder) -{ - //printf("curOrder: "); - //printVs(curOrder); - //printf("idxNames: "); - //printVS(idxNames[stmt]); - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt]); - bool same=true; - std::vector<int> pi; - for(int i=0; i<curOrder.size(); i++){ - bool found = false; - for(int j=0; j<cIdxNames.size(); j++){ - if(strcmp(cIdxNames[j].c_str(), curOrder[i].c_str()) == 0){ - pi.push_back(j+1); - found=true; - if(j!=i) - same=false; - } - } - if(!found){ - throw std::runtime_error("One of the indexes in the permute order where not " - "found in the current set of indexes."); - } - } - for(int i=curOrder.size(); i<cIdxNames.size(); i++){ - pi.push_back(i); - } - if(same) - return; - permute(stmt, pi); - //Set old indexe names as new - for(int i=0; i<curOrder.size(); i++){ - idxNames[stmt][i] = curOrder[i].c_str(); //what about sibling stmts? - } -} - - -bool LoopCuda::permute(int stmt_num, const std::vector<int> &pi) -{ -// check for sanity of parameters - if (stmt_num >= stmt.size() || stmt_num < 0) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - const int n = stmt[stmt_num].xform.n_out(); - if (pi.size() > (n-1)/2) - throw std::invalid_argument("iteration space dimensionality does not match permute dimensionality"); - int first_level = 0; - int last_level = 0; - for (int i = 0; i < pi.size(); i++) { - if (pi[i] > (n-1)/2 || pi[i] <= 0) - throw std::invalid_argument("invalid loop level " + to_string(pi[i]) + " in permuation"); - - if (pi[i] != i+1) { - if (first_level == 0) - first_level = i+1; - last_level = i+1; - } - } - if (first_level == 0) - return true; - - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> active = getStatements(lex, 2*first_level-2); - Loop::permute(active, pi); -} - - -void LoopCuda::tile_cuda(int stmt, int level, int outer_level) -{ - tile_cuda(stmt,level,1,outer_level,"","",CountedTile); -} -void LoopCuda::tile_cuda(int level, int tile_size, int outer_level, std::string idxName, - std::string ctrlName, TilingMethodType method){ - tile_cuda(0, level, tile_size, outer_level, idxName, ctrlName, method); -} - -void LoopCuda::tile_cuda(int stmt, int level, int tile_size, int outer_level, std::string idxName, - std::string ctrlName, TilingMethodType method){ - //Do regular tile but then update the index and control loop variable - //names as well as the idxName to reflect the current state of things. - //printf("tile(%d,%d,%d,%d)\n", stmt, level, tile_size, outer_level); - //printf("idxNames before: "); - //printVS(idxNames[stmt]); - - tile(stmt, level, tile_size, outer_level, method); - - if(idxName.size()) - idxNames[stmt][level-1] = idxName.c_str(); - if(tile_size == 1){ - //potentially rearrange loops - if(outer_level < level){ - std::string tmp = idxNames[stmt][level-1]; - for(int i=level-1; i>outer_level-1; i--){ - if(i-1 >= 0) - idxNames[stmt][i] = idxNames[stmt][i-1]; - } - idxNames[stmt][outer_level-1] = tmp; - } - //TODO: even with a tile size of one, you need a insert (of a dummy loop) - idxNames[stmt].insert(idxNames[stmt].begin()+(level),""); - }else{ - if(!ctrlName.size()) - throw std::runtime_error("No ctrl loop name for tile"); - //insert - idxNames[stmt].insert(idxNames[stmt].begin()+(outer_level-1),ctrlName.c_str()); - } - - //printf("idxNames after: "); - //printVS(idxNames[stmt]); -} - - -bool LoopCuda::datacopy_privatized_cuda(int stmt_num, int level, const std::string &array_name, const std::vector<int> &privatized_levels, bool allow_extra_read , int fastest_changing_dimension , int padding_stride , int padding_alignment , bool cuda_shared) -{ - int old_stmts =stmt.size(); - //datacopy_privatized(stmt_num, level, array_name, privatized_levels, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, cuda_shared); - if(cuda_shared) - datacopy_privatized(stmt_num, level, array_name, privatized_levels, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, 1); - else - datacopy_privatized(stmt_num, level, array_name, privatized_levels, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, 0); - - - //Adjust idxNames to reflect updated state - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt_num]); - int new_stmts = stmt.size(); - for(int i=old_stmts; i<new_stmts; i++){ - //printf("fixing up statement %d\n", i); - std::vector<std::string> idxs; - - - //protonu-making sure the vector of nonSplitLevels grows along with - //the statement structure - stmt_nonSplitLevels.push_back(omega::Tuple<int>()); - - //Indexes up to level will be the same - for(int j=0; j<level-1; j++) - idxs.push_back(cIdxNames[j]); - - //Expect privatized_levels to match - for(int j=0; j<privatized_levels.size(); j++) - idxs.push_back(cIdxNames[privatized_levels[j]-1]);//level is one-based - - //all further levels should match order they are in originally - if(privatized_levels.size()){ - int last_privatized = privatized_levels.back(); - int top_level = last_privatized + (stmt[i].IS.n_set()-idxs.size()); - //printf("last privatized_levels: %d top_level: %d\n", last_privatized, top_level); - for(int j=last_privatized; j<top_level; j++){ - idxs.push_back(cIdxNames[j]); - //printf("pushing back: %s\n", (const char*)cIdxNames[j]); - } - } - idxNames.push_back(idxs); - } -} - -bool LoopCuda::datacopy_cuda(int stmt_num, int level, const std::string &array_name, std::vector<std::string> new_idxs, bool allow_extra_read, int fastest_changing_dimension, int padding_stride, int padding_alignment, bool cuda_shared) -{ - - int old_stmts =stmt.size(); - //datacopy(stmt_num,level,array_name,allow_extra_read,fastest_changing_dimension,padding_stride,padding_alignment,cuda_shared); - if(cuda_shared) - datacopy(stmt_num,level,array_name,allow_extra_read,fastest_changing_dimension,padding_stride,padding_alignment, 1); - else - datacopy(stmt_num,level,array_name,allow_extra_read,fastest_changing_dimension,padding_stride,padding_alignment, 0); - //Adjust idxNames to reflect updated state - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt_num]); - int new_stmts = stmt.size(); - for(int i=old_stmts; i<new_stmts; i++){ - //printf("fixing up statement %d\n", i); - std::vector<std::string> idxs; - - //protonu-making sure the vector of nonSplitLevels grows along with - //the statement structure - stmt_nonSplitLevels.push_back(omega::Tuple<int>()); - - //protonu--lets dump out the code from each statement here - //printf("\n dumping statement :%d", i); - //stmt[i].code->Dump(); - - //Indexes up to level will be the same - for(int j=0; j<level-1; j++) - idxs.push_back(cIdxNames[j]); - - //all further levels should get names from new_idxs - int top_level = stmt[i].IS.n_set(); - //printf("top_level: %d level: %d\n", top_level, level); - if(new_idxs.size() < top_level-level+1) - throw std::runtime_error("Need more new index names for new datacopy loop levels"); - - for(int j=level-1; j<top_level; j++){ - idxs.push_back(new_idxs[j-level+1].c_str()); - //printf("pushing back: %s\n", new_idxs[j-level+1].c_str()); - } - idxNames.push_back(idxs); - } -} - -bool LoopCuda::unroll_cuda(int stmt_num, int level, int unroll_amount) -{ - int old_stmts =stmt.size(); - //bool b= unroll(stmt_num, , unroll_amount); - - - int dim = 2*level-1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim-1); - - level = nonDummyLevel(stmt_num,level); - //printf("unrolling %d at level %d\n", stmt_num,level); - - //protonu--using the new version of unroll, which returns - //a set of ints instead of a bool. To keep Gabe's logic - //I'll check the size of the set, if it's 0 return true - //bool b= unroll(stmt_num, level, unroll_amount); - std::set<int> b_set= unroll(stmt_num, level, unroll_amount); - bool b = false; - if (b_set.size() == 0) b = true; - //end--protonu - - //Adjust idxNames to reflect updated state - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt_num]); - std::vector<std::string> origSource = idxNames[stmt_num];; - //Drop index names at level - if(unroll_amount == 0){ - //For all statements that were in this unroll together, drop index name for unrolled level - idxNames[stmt_num][level-1] = ""; - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - //printf("in same loop as %d is %d\n", stmt_num, (*i)); - //idxNames[(*i)][level-1] = ""; - idxNames[(*i)] = idxNames[stmt_num]; - } - } - - lex = getLexicalOrder(stmt_num); - same_loop = getStatements(lex, dim-1); - - bool same_as_source = false; - int new_stmts = stmt.size(); - for(int i=old_stmts; i<new_stmts; i++){ - //Check whether we had a sync for the statement we are unrolling, if - //so, propogate that to newly created statements so that if they are - //in a different loop structure, they will also get a syncthreads - int size = syncs.size(); - for(int j=0; j<size; j++){ - if(syncs[j].first == stmt_num) - syncs.push_back(make_pair(i,syncs[j].second)); - } - - //protonu-making sure the vector of nonSplitLevels grows along with - //the statement structure - stmt_nonSplitLevels.push_back(omega::Tuple<int>()); - - - //We expect that new statements have a constant for the variable in - //stmt[i].IS at level (as seen with print_with_subs), otherwise there - //will be a for loop at level and idxNames should match stmt's - //idxNames pre-unrolled - Relation IS = stmt[i].IS; - //Ok, if you know how the hell to get anything out of a Relation, you - //should probably be able to do this more elegantly. But for now, I'm - //hacking it. - std::string s = IS.print_with_subs_to_string(); - //s looks looks like - //{[_t49,8,_t51,_t52,128]: 0 <= _t52 <= 3 && 0 <= _t51 <= 15 && 0 <= _t49 && 64_t49+16_t52+_t51 <= 128} - //where level == 5, you see a integer in the input set - - //If that's not an integer and this is the first new statement, then - //we think codegen will have a loop at that level. It's not perfect, - //not sure if it can be determined without round-tripping to codegen. - int sIdx = 0; - int eIdx = 0; - for(int j=0; j<level-1; j++){ - sIdx = s.find(",",sIdx+1); - if(sIdx < 0) break; - } - if(sIdx > 0){ - eIdx = s.find("]"); - int tmp = s.find(",",sIdx+1); - if(tmp > 0 && tmp < eIdx) - eIdx = tmp; //", before ]" - if(eIdx > 0){ - sIdx++; - std::string var = s.substr(sIdx,eIdx-sIdx); - //printf("%s\n", s.c_str()); - //printf("set var for stmt %d at level %d is %s\n", i, level, var.c_str()); - if(atoi(var.c_str()) == 0 && i ==old_stmts){ - //TODO:Maybe do see if this new statement would be in the same - //group as the original and if it would, don't say - //same_as_source - if(same_loop.find(i) == same_loop.end()){ - printf("stmt %d level %d, newly created unroll statement should have same level indexes as source\n", i, level); - same_as_source = true; - } - } - } - } - - - //printf("fixing up statement %d n_set %d with %d levels\n", i, stmt[i].IS.n_set(), level-1); - if(same_as_source) - idxNames.push_back(origSource); - else - idxNames.push_back(idxNames[stmt_num]); - } - - return b; -} - -void LoopCuda::copy_to_texture(const char *array_name) -{ - //protonu--placeholder for now - //set the bool for using cuda memory as true - //in a vector of strings, put the names of arrays to tex mapped - if ( !texture ) - texture = new texture_memory_mapping(true, array_name); - else - texture->add(array_name); - - -} - - -void LoopCuda::copy_to_constant(const char *array_name) -{ - //protonu--placeholder for now - //set the bool for using cuda memory as true - //in a vector of strings, put the names of arrays to tex mapped - if ( !constant_mem ) - constant_mem = new constant_memory_mapping(true, array_name); - else - constant_mem->add(array_name); -} - -//protonu--moving this from Loop -tree_node_list* LoopCuda::codegen() -{ - if(code_gen_flags & GenCudaizeV2) - return cudaize_codegen_v2(); - //Do other flagged codegen methods, return plain vanilla generated code - return getCode(); -} - -//These three are in Omega code_gen.cc and are used as a massive hack to -//get out some info from MMGenerateCode. Yea for nasty side-effects. -namespace omega{ - extern int checkLoopLevel; - extern int stmtForLoopCheck; - extern int upperBoundForLevel; - extern int lowerBoundForLevel; -} - - -void LoopCuda::extractCudaUB(int stmt_num, int level, int &outUpperBound, int &outLowerBound){ - // check for sanity of parameters - const int m = stmt.size(); - if (stmt_num >= m || stmt_num < 0) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - const int n = stmt[stmt_num].xform.n_out(); - if (level > (n-1)/2 || level <= 0) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - int dim = 2*level-1; - - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim-1); - - // extract the intersection of the iteration space to be considered - Relation hull; - { - hull = Relation::True(n); - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - hull = Intersection(hull, project_onto_levels(getNewIS(*i), dim+1, true)); - hull.simplify(2, 4); - } - - for (int i = 2; i <= dim+1; i+=2) { - //std::string name = std::string("_t") + to_string(t_counter++); - std::string name = std::string("_t") + to_string(tmp_loop_var_name_counter++); - hull.name_set_var(i, name); - } - hull.setup_names(); - } - - // extract the exact loop bound of the dimension to be unrolled - if (is_single_iteration(hull, dim)){ - throw std::runtime_error("No loop availabe at level to extract upper bound."); - } - Relation bound = get_loop_bound(hull, dim); - if (!bound.has_single_conjunct() || !bound.is_satisfiable() || bound.is_tautology()) - throw loop_error("loop error: unable to extract loop bound for cudaize"); - - // extract the loop stride - EQ_Handle stride_eq; - int stride = 1; - { - bool simple_stride = true; - int strides = countStrides(bound.query_DNF()->single_conjunct(), bound.set_var(dim+1), stride_eq, simple_stride); - if (strides > 1) - throw loop_error("loop error: too many strides"); - else if (strides == 1) { - int sign = stride_eq.get_coef(bound.set_var(dim+1)); -// assert(sign == 1 || sign == -1); - Constr_Vars_Iter it(stride_eq, true); - stride = abs((*it).coef/sign); - } - } - if(stride != 1){ - char buf[1024]; - sprintf(buf, "Cudaize: Loop at level %d has non-one stride of %d", level, stride); - throw std::runtime_error(buf); - } - - //Use code generation system to build tell us our bound information. We - //need a hard upper bound a 0 lower bound. - - checkLoopLevel = level*2; - stmtForLoopCheck = stmt_num; - upperBoundForLevel = -1; - lowerBoundForLevel = -1; - printCode(1,false); - checkLoopLevel = 0; - - outUpperBound = upperBoundForLevel; - outLowerBound = lowerBoundForLevel; - return; -} - - -void LoopCuda::printCode(int effort, bool actuallyPrint) const { - const int m = stmt.size(); - if (m == 0) - return; - const int n = stmt[0].xform.n_out(); - - - - Tuple<Relation> IS(m); - Tuple<Relation> xform(m); - Tuple<IntTuple > nonSplitLevels(m); - for (int i = 0; i < m; i++) { - IS[i+1] = stmt[i].IS; - xform[i+1] = stmt[i].xform; - nonSplitLevels[i+1] = stmt_nonSplitLevels[i]; - //nonSplitLevels[i+1] = stmt[i].nonSplitLevels; - } - - Tuple< Tuple<std::string> > idxTupleNames; - if(useIdxNames){ - for(int i=0; i<idxNames.size(); i++){ - Tuple<std::string> idxs; - for(int j=0; j<idxNames[i].size(); j++) - idxs.append(idxNames[i][j]); - idxTupleNames.append( idxs ); - } - } - - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - CG_stringBuilder *ocg = new CG_stringBuilder(); - Tuple<CG_outputRepr *> nameInfo; - for (int i = 1; i <= m; i++) - nameInfo.append(new CG_stringRepr("s" + to_string(i))); - CG_outputRepr* repr = MMGenerateCode(ocg, xform, IS, nameInfo, known, nonSplitLevels, syncs, idxTupleNames, effort); - if(actuallyPrint) - std::cout << GetString(repr); -/* - for (int i = 1; i <= m; i++) - delete nameInfo[i]; -*/ - - delete ocg; -} - - - -void LoopCuda::printRuntimeInfo() const { - for(int i=0; i<stmt.size(); i++){ - Relation IS = stmt[i].IS; - Relation xform = stmt[i].xform; - printf("stmt[%d]\n", i); - printf("IS\n"); - IS.print_with_subs(); - - printf("xform[%d]\n", i); - xform.print_with_subs(); - - //printf("code\n"); - //static_cast<CG_suifRepr *>(stmt[i].code)->GetCode()->print_expr(); - } -} - -void LoopCuda::printIndexes() const { - for(int i=0; i<stmt.size(); i++){ - printf("stmt %d nset %d ", i, stmt[i].IS.n_set()); - - for(int j=0; j<idxNames[i].size(); j++){ - if(j>0) - printf(","); - printf("%s", idxNames[i][j].c_str()); - } - printf("\n"); - } -} - -tree_node_list* LoopCuda::getCode(int effort) const { - const int m = stmt.size(); - if (m == 0) - return new tree_node_list; - const int n = stmt[0].xform.n_out(); - - - - Tuple<CG_outputRepr *> ni(m); - Tuple<Relation> IS(m); - Tuple<Relation> xform(m); - Tuple< IntTuple > nonSplitLevels(m); - for (int i = 0; i < m; i++) { - ni[i+1] = stmt[i].code; - IS[i+1] = stmt[i].IS; - xform[i+1] = stmt[i].xform; - nonSplitLevels[i+1] = stmt_nonSplitLevels[i]; - //nonSplitLevels[i+1] = stmt[i].nonSplitLevels; - } - - - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); -#ifdef DEBUG -// std::cout << GetString(MMGenerateCode(new CG_stringBuilder(), xform, IS, known, effort)); -#endif - Tuple< Tuple<std::string> > idxTupleNames; - if(useIdxNames){ - for(int i=0; i<idxNames.size(); i++){ - Tuple<std::string> idxs; - for(int j=0; j<idxNames[i].size(); j++) - idxs.append(idxNames[i][j]); - idxTupleNames.append( idxs ); - } - } - - CG_outputBuilder *ocg = ir->builder(); - CG_outputRepr *repr = MMGenerateCode(ocg, xform, IS, ni, known, nonSplitLevels, syncs, idxTupleNames, effort); - - //CG_outputRepr *overflow_initialization = ocg->CreateStmtList(); - //protonu--using the new function CG_suifBuilder::StmtListAppend - CG_outputRepr *overflow_initialization = ocg->StmtListAppend(NULL, NULL); - for (std::map<int, std::vector<Free_Var_Decl *> >::const_iterator i = overflow.begin(); i != overflow.end(); i++) - for (std::vector<Free_Var_Decl *>::const_iterator j = i->second.begin(); j != i->second.end(); j++) - //overflow_initialization = ocg->StmtListAppend(overflow_initialization, ocg->CreateStmtList(ocg->CreateAssignment(0, ocg->CreateIdent((*j)->base_name()), ocg->CreateInt(0)))); - overflow_initialization = ocg->StmtListAppend(overflow_initialization, ocg->StmtListAppend(ocg->CreateAssignment(0, ocg->CreateIdent((*j)->base_name()), ocg->CreateInt(0)), NULL)); - - repr = ocg->StmtListAppend(overflow_initialization, repr); - tree_node_list *tnl = static_cast<CG_suifRepr *>(repr)->GetCode(); - - delete repr; - /* - for (int i = 1; i <= m; i++) - delete ni[i]; - */ - - return tnl; -} - - -//protonu--adding constructors for the new derived class -LoopCuda::LoopCuda():Loop(), code_gen_flags(GenInit){} - -LoopCuda::LoopCuda(IR_Control *irc, int loop_num) - :Loop(irc) -{ - setup_code = NULL; - teardown_code = NULL; - code_gen_flags = 0; - cu_bx = cu_by = cu_tx = cu_ty = cu_tz = 1; - cu_num_reduce = 0; - cu_mode = GlobalMem; - texture = NULL; - constant_mem = NULL; - - int m=stmt.size(); - //printf("\n the size of stmt(initially) is: %d\n", stmt.size()); - for(int i=0; i<m; i++) - stmt_nonSplitLevels.push_back(omega::Tuple<int>()); - - - //protonu--setting up - //proc_symtab *symtab - //global_symtab *globals - - globals = ((IR_cudasuifCode *)ir)->gsym_ ; - std::vector<tree_for *> tf = ((IR_cudasuifCode *)ir)->get_loops(); - - symtab = tf[loop_num]->proc()->block()->proc_syms(); - - std::vector<tree_for *> deepest = find_deepest_loops(tf[loop_num]); - - for (int i = 0; i < deepest.size(); i++){ - index.push_back(deepest[i]->index()->name()); //reflects original code index names - } - - for(int i=0; i< stmt.size(); i++) - idxNames.push_back(index); //refects prefered index names (used as handles in cudaize v2) - useIdxNames=false; - -} - diff --git a/loop_cuda.hh b/loop_cuda.hh deleted file mode 100644 index 15726c0..0000000 --- a/loop_cuda.hh +++ /dev/null @@ -1,163 +0,0 @@ -#ifndef LOOP_CUDA_HH -#define LOOP_CUDA_HH - -#include "loop.hh" -#include <string.h> -#include <suif1.h> - - -enum MemoryMode { GlobalMem, SharedMem, TexMem }; - -//protonu --class introduced to hold texture memory information in one single place -//this might help me get over the weird memory issues I am having with the Loop class -//where someone/something corrupts my memory -class texture_memory_mapping{ -private: - bool tex_mem_used; - std::vector< std::string > tex_mapped_array_name; -public: - texture_memory_mapping ( bool used, const char * array_name){ - tex_mem_used = used; - tex_mapped_array_name.push_back(std::string(array_name)); - } - - void add(const char * array_name) { - tex_mapped_array_name.push_back(std::string(array_name)); - } - - bool is_tex_mem_used() {return tex_mem_used;} - bool is_array_tex_mapped(const char * array_name){ - - for( int i=0; i<tex_mapped_array_name.size(); i++){ - if(!(strcmp(array_name, tex_mapped_array_name[i].c_str()))) - return true; - } - return false; - } - texture_memory_mapping() {tex_mem_used = false;} -}; - -//protonu --class introduced to hold constant memory information in one single place -//this might help me get over the weird memory issues I am having with the Loop class -//where someone/something corrupts my memory -class constant_memory_mapping{ -private: - bool cons_mem_used; - std::vector< std::string > cons_mapped_array_name; -public: - constant_memory_mapping ( bool used, const char * array_name){ - cons_mem_used = used; - cons_mapped_array_name.push_back(std::string(array_name)); - } - - void add(const char * array_name) { - cons_mapped_array_name.push_back(std::string(array_name)); - } - - bool is_cons_mem_used() {return cons_mem_used;} - bool is_array_cons_mapped(const char * array_name){ - - for( int i=0; i<cons_mapped_array_name.size(); i++){ - if(!(strcmp(array_name, cons_mapped_array_name[i].c_str()))) - return true; - } - return false; - } - constant_memory_mapping() {cons_mem_used = false;} -}; - - -class LoopCuda: public Loop{ - -public: - std::vector<proc_sym*> new_procs; //Need adding to a fse - std::vector< std::vector<std::string> > idxNames; - std::vector< std::pair<int, std::string> > syncs; - bool useIdxNames; - std::vector<std::string> index; - proc_symtab *symtab; - global_symtab *globals; - - //protonu--inserting this here, Gabe's implementation had it - //the struct statment as nonSplitLevels - std::vector<omega::Tuple<int> > stmt_nonSplitLevels; - - texture_memory_mapping *texture; //protonu - constant_memory_mapping *constant_mem; //protonu - std::map<std::string, int> array_dims; - omega::CG_outputRepr *setup_code; - omega::CG_outputRepr *teardown_code; - - unsigned int code_gen_flags; - enum CodeGenFlags { - GenInit = 0x00, - GenCudaizeV2 = 0x02, - }; - - - //varibles used by cudaize_codegen - //block x, y sizes, N and num_red - int cu_bx, cu_by, cu_n, cu_num_reduce; - //block statement and level - int cu_block_stmt, cu_block_level; - //thread x, y, z - int cu_tx, cu_ty, cu_tz; - //tile statements, and loop-levels (cudaize v1) - std::vector< std::vector<int> > cu_thread_loop; - std::vector<int> cu_thread_sync; - MemoryMode cu_mode; - - std::string cu_nx_name, cu_ny_name, cu_kernel_name; - int nonDummyLevel(int stmt, int level); - bool symbolExists(std::string s); - void addSync(int stmt, std::string idx); - void renameIndex(int stmt, std::string idx, std::string newName); - bool validIndexes(int stmt, const std::vector<std::string>& idxs); - void extractCudaUB(int stmt_num, int level, int &outUpperBound, int &outLowerBound); - - void printCode(int effort=1, bool actuallyPrint=true) const; - void printRuntimeInfo() const; - void printIndexes() const; - tree_node_list* getCode(int effort = 1) const; - - - void permute_cuda(int stmt, const std::vector<std::string>& curOrder); - //protonu-writing a wrapper for the Chun's new permute function - bool permute(int stmt_num, const std::vector<int> &pi); - //end--protonu. - void tile_cuda(int stmt, int level, int outer_level); - void tile_cuda(int level, int tile_size, int outer_level, std::string idxName, std::string ctrlName, TilingMethodType method=StridedTile); - void tile_cuda(int stmt, int level, int tile_size, int outer_level, std::string idxName, std::string ctrlName, TilingMethodType method=StridedTile); - bool datacopy_privatized_cuda(int stmt_num, int level, const std::string &array_name, const std::vector<int> &privatized_levels, bool allow_extra_read = false, int fastest_changing_dimension = -1, int padding_stride = 1, int padding_alignment = 1, bool cuda_shared=false); - bool datacopy_cuda(int stmt_num, int level, const std::string &array_name, std::vector<std::string> new_idxs, bool allow_extra_read = false, int fastest_changing_dimension = -1, int padding_stride = 1, int padding_alignment = 4, bool cuda_shared=false); - bool unroll_cuda(int stmt_num, int level, int unroll_amount); - //protonu--using texture memory - void copy_to_texture(const char *array_name); - //protonu--using constant memory - void copy_to_constant(const char *array_name); - int findCurLevel(int stmt, std::string idx); - /** - * - * @param kernel_name Name of the GPU generated kernel - * @param nx Iteration space over the x dimention - * @param ny Iteration space over the y dimention - * @param tx Tile dimention over x dimention - * @param ty Tile dimention over the y dimention - * @param num_reduce The number of dimentions to reduce by mapping to the GPU implicit blocks/threads - */ - //stmnt_num is referenced from the perspective of being inside the cudize block loops - bool cudaize_v2(std::string kernel_name, std::map<std::string, int> array_dims, - std::vector<std::string> blockIdxs, std::vector<std::string> threadIdxs); - tree_node_list* cudaize_codegen_v2(); - tree_node_list* codegen(); - - //protonu--have to add the constructors for the new class - //and maybe destructors (?) - LoopCuda(); - //LoopCuda(IR_Code *ir, tree_for *tf, global_symtab* gsym); - LoopCuda(IR_Control *ir_c, int loop_num);//protonu-added so as to not change ir_suif - ~LoopCuda(); - -}; - -#endif diff --git a/loop_cuda_rose.cc b/loop_cuda_rose.cc deleted file mode 100644 index c5633ee..0000000 --- a/loop_cuda_rose.cc +++ /dev/null @@ -1,3734 +0,0 @@ -/***************************************************************************** - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - Cudaize methods - - Notes: - - History: - 1/7/10 Created by Gabe Rudy by migrating code from loop.cc - 31/1/11 Modified by Protonu Basu -*****************************************************************************/ -#define TRANSFORMATION_FILE_INFO Sg_File_Info::generateDefaultFileInfoForTransformationNode() -#include <code_gen/CG_stringBuilder.h> -#include <codegen.h> -#include <code_gen/CG_utils.h> -#include <code_gen/CG_outputRepr.h> -#include "loop_cuda_rose.hh" -#include "loop.hh" -#include <math.h> -//#include <useful.h> -#include "omegatools.hh" -#include "ir_cudarose.hh" -#include "ir_rose.hh" -#include "ir_rose_utils.hh" -#include "chill_error.hh" -#include <vector> -#include "Outliner.hh" -//#define DEBUG -using namespace omega; -using namespace SageBuilder; -using namespace SageInterface; -//using namespace Outliner; -//using namespace ASTtools; -char *k_cuda_texture_memory; //protonu--added to track texture memory type -//extern char *omega::k_cuda_texture_memory; //protonu--added to track texture memory type -extern char *omega::k_ocg_comment; - -static int cudaDebug; -class CudaStaticInit { -public: - CudaStaticInit() { - cudaDebug = 0; //Change this to 1 for debug - } -}; -static CudaStaticInit junkInitInstance__; - -std::string& upcase(std::string& s) { - for (int i = 0; i < s.size(); i++) - s[i] = toupper(s[i]); - return s; -} - -void printVs(const std::vector<std::string>& curOrder) { - if (!cudaDebug) return; - for (int i = 0; i < curOrder.size(); i++) { - if (i > 0) - printf(","); - printf("%s", curOrder[i].c_str()); - } - printf("\n"); -} - -void printVS(const std::vector<std::string>& curOrder) { - if(!cudaDebug) return; - for (int i = 0; i < curOrder.size(); i++) { - if (i > 0) - printf(","); - printf("%s", curOrder[i].c_str()); - } - printf("\n"); -} - -LoopCuda::~LoopCuda() { - const int m = stmt.size(); - for (int i = 0; i < m; i++) - stmt[i].code->clear(); -} - -bool LoopCuda::symbolExists(std::string s) { - - if (body_symtab->find_variable(SgName(s.c_str())) - || parameter_symtab->find_variable(SgName(s.c_str()))) - return true; - if (globals->lookup_variable_symbol(SgName(s.c_str()))) - return true; - for (int i = 0; i < idxNames.size(); i++) - for (int j = 0; j < idxNames[i].size(); j++) - if (strcmp(idxNames[i][j].c_str(), s.c_str()) == 0) - return true; - return false; -} - -void LoopCuda::addSync(int stmt_num, std::string idxName) { - //we store these and code-gen inserts sync to omega comments where stmt - //in loop that has idxName being generated - syncs.push_back(make_pair(stmt_num, idxName)); -} - -void LoopCuda::renameIndex(int stmt_num, std::string idx, std::string newName) { - int level = findCurLevel(stmt_num, idx); - if (idxNames.size() <= stmt_num || idxNames[stmt_num].size() < level) - throw std::runtime_error("Invalid statment number of index"); - idxNames[stmt_num][level - 1] = newName.c_str(); -} - -enum Type { - Int -}; - -SgNode* wrapInIfFromMinBound(SgNode* then_part, SgForStatement* loop, - SgScopeStatement* symtab, SgVariableSymbol* bound_sym) { - // CG_roseBuilder *ocg = new CG_roseBuilder( - - SgBinaryOp* test_expr = isSgBinaryOp(loop->get_test_expr()); - SgExpression* upperBound; - SgExpression* conditional; - upperBound = test_expr->get_rhs_operand(); - CG_outputRepr *ifstmt; - - SgCallExpression *call; - if (call = isSgCallExpression(upperBound)) - if (isSgVarRefExp(call->get_function())->get_symbol()->get_name().getString() - == "__rose_lt") { - SgExprListExp* arg_list = call->get_args(); - SgExpression *if_bound = *(arg_list->get_expressions().begin()); - /*This relies on the minimum expression being the rhs operand of - * the min instruction. - */ - SgIfStmt *ifstmt = buildIfStmt( - buildLessOrEqualOp(buildVarRefExp(bound_sym), if_bound), - isSgStatement(then_part), NULL); - return isSgNode(ifstmt); - - } - -/* if (isSgConditionalExp(upperBound)) { - conditional = isSgConditionalExp(upperBound)->get_conditional_exp(); - - if (isSgBinaryOp(conditional)) { - SgBinaryOp* binop = isSgBinaryOp(conditional); - - if (isSgLessThanOp(binop) || isSgLessOrEqualOp(binop)) { - SgIfStmt *ifstmt = buildIfStmt( - buildLessOrEqualOp(buildVarRefExp(bound_sym), - test_expr), isSgStatement(then_part), NULL); - return isSgNode(ifstmt); - } - - } - - } -*/ - return then_part; -} - -/** - * This would be better if it was done by a CHiLL xformation instead of at codegen - * - * state: - * for(...) - * for(...) - * cur_body - * stmt1 - * - * stm1 is in-between two loops that are going to be reduced. The - * solution is to put stmt1 at the end of cur_body but conditionally run - * in on the last step of the for loop. - * - * A CHiLL command that would work better: - * - * for(...) - * stmt0 - * for(for i=0; i<n; i++) - * cur_body - * stmt1 - * => - * for(...) - * for(for i=0; i<n; i++) - * if(i==0) stmt0 - * cur_body - * if(i==n-1) stmt1 - */ - -std::vector<SgForStatement*> findCommentedFors(const char* index, SgNode* tnl) { - std::vector<SgForStatement *> result; - bool next_loop_ok = false; - - if (isSgBasicBlock(tnl)) { - - SgStatementPtrList& list = isSgBasicBlock(tnl)->get_statements(); - - for (SgStatementPtrList::iterator it = list.begin(); it != list.end(); - it++) { - std::vector<SgForStatement*> t = findCommentedFors(index, - isSgNode(*it)); - std::copy(t.begin(), t.end(), back_inserter(result)); - } - } else if (isSgForStatement(tnl)) { - - AstTextAttribute* att = - (AstTextAttribute*) (isSgNode(tnl)->getAttribute( - "omega_comment")); - std::string comment = att->toString(); - - if (comment.find("~cuda~") != std::string::npos - && comment.find("preferredIdx: ") != std::string::npos) { - std::string idx = comment.substr( - comment.find("preferredIdx: ") + 14, std::string::npos); - if (idx.find(" ") != std::string::npos) - idx = idx.substr(0, idx.find(" ")); - if (strcmp(idx.c_str(), index) == 0) - next_loop_ok = true; - } - - if (next_loop_ok) { - //printf("found loop %s\n", static_cast<tree_for *>(tn)->index()->name()); - result.push_back(isSgForStatement(tnl)); - } else { - //printf("looking down for loop %s\n", static_cast<tree_for *>(tn)->index()->name()); - std::vector<SgForStatement*> t = findCommentedFors(index, - isSgForStatement(tnl)->get_loop_body()); - std::copy(t.begin(), t.end(), back_inserter(result)); - } - next_loop_ok = false; - } else if (isSgIfStmt(tnl)) { - //printf("looking down if\n"); - SgIfStmt *tni = isSgIfStmt(tnl); - std::vector<SgForStatement*> t = findCommentedFors(index, - tni->get_true_body()); - std::copy(t.begin(), t.end(), back_inserter(result)); - } - - return result; -} - -SgNode* forReduce(SgForStatement* loop, SgVariableSymbol* reduceIndex, - SgScopeStatement* body_syms) { - //We did the replacements all at once with recursiveFindPreferedIdxs - //replacements r; - //r.oldsyms.append(loop->index()); - //r.newsyms.append(reduceIndex); - //tree_for* new_loop = (tree_for*)loop->clone_helper(&r, true); - SgForStatement* new_loop = loop; - - //return body one loops in - SgNode* tnl = loop_body_at_level(new_loop, 1); - //wrap in conditional if necessary - tnl = wrapInIfFromMinBound(tnl, new_loop, body_syms, reduceIndex); - return tnl; -} - -void recursiveFindRefs(SgNode* code, std::set<const SgVariableSymbol *>& syms, - SgFunctionDefinition* def) { - - SgStatement* s = isSgStatement(code); - // L = {symbols defined within 's'}, local variables declared within 's' - ASTtools::VarSymSet_t L; - ASTtools::collectDefdVarSyms(s, L); - //dump (L, "L = "); - - // U = {symbols used within 's'} - ASTtools::VarSymSet_t U; - ASTtools::collectRefdVarSyms(s, U); - //dump (U, "U = "); - - // U - L = {symbols used within 's' but not defined in 's'} - // variable references to non-local-declared variables - ASTtools::VarSymSet_t diff_U_L; - set_difference(U.begin(), U.end(), L.begin(), L.end(), - inserter(diff_U_L, diff_U_L.begin())); - //dump (diff_U_L, "U - L = "); - - // Q = {symbols defined within the function surrounding 's' that are - // visible at 's'}, including function parameters - ASTtools::VarSymSet_t Q; - ASTtools::collectLocalVisibleVarSyms(def->get_declaration(), s, Q); -// dump (Q, "Q = "); - - // (U - L) \cap Q = {variables that need to be passed as parameters - // to the outlined function} - // a sub set of variables that are not globally visible (no need to pass at all) - // It excludes the variables with a scope between global and the enclosing function - set_intersection(diff_U_L.begin(), diff_U_L.end(), Q.begin(), Q.end(), - inserter(syms, syms.begin())); - - /* std::vector<SgVariableSymbol *> scalars; - //SgNode *tnl = static_cast<const omega::CG_roseRepr *>(repr)->GetCode(); - SgStatement* stmt; - SgExpression* exp; - if (tnl != NULL) { - if(stmt = isSgStatement(tnl)){ - if(isSgBasicBlock(stmt)){ - SgStatementPtrList& stmts = isSgBasicBlock(stmt)->get_statements(); - for(int i =0; i < stmts.size(); i++){ - //omega::CG_roseRepr *r = new omega::CG_roseRepr(isSgNode(stmts[i])); - std::vector<SgVariableSymbol *> a = recursiveFindRefs(isSgNode(stmts[i])); - //delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - } - - } - else if(isSgForStatement(stmt)){ - - SgForStatement *tnf = isSgForStatement(stmt); - //omega::CG_roseRepr *r = new omega::CG_roseRepr(isSgStatement(tnf->get_loop_body())); - std::vector<SgVariableSymbol *> a = recursiveFindRefs(isSgNode(tnf->get_loop_body())); - //delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - } - else if(isSgFortranDo(stmt)){ - SgFortranDo *tfortran = isSgFortranDo(stmt); - omega::CG_roseRepr *r = new omega::CG_roseRepr(isSgStatement(tfortran->get_body())); - std::vector<SgVariableSymbol *> a = recursiveFindRefs(r); - delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - } - - else if(isSgIfStmt(stmt) ){ - SgIfStmt* tni = isSgIfStmt(stmt); - //omega::CG_roseRepr *r = new omega::CG_roseRepr(isSgNode(tni->get_conditional())); - std::vector<SgVariableSymbol *> a = recursiveFindRefs(isSgNode(tni->get_conditional())); - //delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - //r = new omega::CG_roseRepr(isSgNode(tni->get_true_body())); - a = recursiveFindRefs(isSgNode(tni->get_true_body())); - //delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - //r = new omega::CG_roseRepr(isSgNode(tni->get_false_body())); - a = recursiveFindRefs(isSgNode(tni->get_false_body())); - //delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - } - else if(isSgExprStatement(stmt)) { - //omega::CG_roseRepr *r = new omega::CG_roseRepr(isSgExpression(isSgExprStatement(stmt)->get_expression())); - std::vector<SgVariableSymbol *> a = recursiveFindRefs(isSgNode(isSgExprStatement(stmt)->get_expression())); - //delete r; - std::copy(a.begin(), a.end(), back_inserter(scalars)); - - } - } - } - else{ - SgExpression* op = isSgExpression(tnl); - if(isSgVarRefExp(op)){ - - scalars.push_back(isSgVarRefExp(op)->get_symbol()); - - } - else if( isSgAssignOp(op)){ - //omega::CG_roseRepr *r1 = new omega::CG_roseRepr(isSgAssignOp(op)->get_lhs_operand()); - std::vector<SgVariableSymbol *> a1 = recursiveFindRefs(isSgNode(isSgAssignOp(op)->get_lhs_operand())); - //delete r1; - std::copy(a1.begin(), a1.end(), back_inserter(scalars)); - //omega::CG_roseRepr *r2 = new omega::CG_roseRepr(isSgAssignOp(op)->get_rhs_operand()); - std::vector<SgVariableSymbol *> a2 = recursiveFindRefs(isSgNode(isSgAssignOp(op)->get_rhs_operand())); - //delete r2; - std::copy(a2.begin(), a2.end(), back_inserter(scalars)); - - } - else if(isSgBinaryOp(op)){ - // omega::CG_roseRepr *r1 = new omega::CG_roseRepr(isSgBinaryOp(op)->get_lhs_operand()); - std::vector<SgVariableSymbol *> a1 = recursiveFindRefs(isSgNode(isSgBinaryOp(op)->get_lhs_operand())); - //delete r1; - std::copy(a1.begin(), a1.end(), back_inserter(scalars)); - //omega::CG_roseRepr *r2 = new omega::CG_roseRepr(isSgBinaryOp(op)->get_rhs_operand()); - std::vector<SgVariableSymbol *> a2 = recursiveFindRefs((isSgBinaryOp(op)->get_rhs_operand())); - //delete r2; - std::copy(a2.begin(), a2.end(), back_inserter(scalars)); - } - else if(isSgUnaryOp(op)){ - //omega::CG_roseRepr *r1 = new omega::CG_roseRepr(isSgUnaryOp(op)->get_operand()); - std::vector<SgVariableSymbol *> a1 = recursiveFindRefs(isSgNode(isSgUnaryOp(op)->get_operand())); - //delete r1; - std::copy(a1.begin(), a1.end(), back_inserter(scalars)); - } - - } - return scalars; - - - */ - -} - -SgNode* recursiveFindReplacePreferedIdxs(SgNode* code, SgSymbolTable* body_syms, - SgSymbolTable* param_syms, SgScopeStatement* body, - std::map<std::string, SgVariableSymbol*>& loop_idxs, - SgGlobal* globalscope, bool sync = false) { - //tree_node_list* tnl = new tree_node_list; - //tree_node_list_iter tnli(code); - SgVariableSymbol* idxSym = 0; - std::vector<SgStatement*> r1; - std::vector<SgNode*> r2; - SgNode* tnli; - SgNode* tnli1; - SgNode* tnli2; - SgBasicBlock * clone; - - if (isSgForStatement(code)) { - AstTextAttribute* att = - (AstTextAttribute*) (isSgNode(code)->getAttribute( - "omega_comment")); - - std::string comment; - if (att != NULL) - comment = att->toString(); - - if (comment.find("~cuda~") != std::string::npos - && comment.find("preferredIdx: ") != std::string::npos) { - std::string idx = comment.substr( - comment.find("preferredIdx: ") + 14, std::string::npos); - if (idx.find(" ") != std::string::npos) - idx = idx.substr(0, idx.find(" ")); - if (loop_idxs.find(idx) != loop_idxs.end()) - idxSym = loop_idxs.find(idx)->second; - //Get the proc variable sybol for this preferred index - if (idxSym == 0) { - idxSym = body_syms->find_variable(idx.c_str()); - if (!idxSym) - idxSym = param_syms->find_variable(idx.c_str()); - //printf("idx not found: lookup %p\n", idxSym); - if (!idxSym) { - SgVariableDeclaration* defn = buildVariableDeclaration( - SgName((char*) idx.c_str()), buildIntType()); - //idxSym = new var_sym(type_s32, (char*)idx.c_str()); - SgInitializedNamePtrList& variables = defn->get_variables(); - SgInitializedNamePtrList::const_iterator i = - variables.begin(); - SgInitializedName* initializedName = *i; - SgVariableSymbol* vs = new SgVariableSymbol( - initializedName); - prependStatement(defn, body); - vs->set_parent(body_syms); - body_syms->insert(SgName((char*) idx.c_str()), vs); - idxSym = vs; - //printf("idx created and inserted\n"); - } - //Now insert into our map for future - if (cudaDebug) - std::cout << idx << "\n\n"; - loop_idxs.insert(make_pair(idx, idxSym)); - } - //See if we have a sync as well - if (comment.find("sync") != std::string::npos) { - //printf("Inserting sync after current block\n"); - sync = true; - } - - } - if (idxSym) { - SgForInitStatement* list = - isSgForStatement(code)->get_for_init_stmt(); - SgStatementPtrList& initStatements = list->get_init_stmt(); - SgStatementPtrList::const_iterator j = initStatements.begin(); - const SgVariableSymbol* index; - - if (SgExprStatement *expr = isSgExprStatement(*j)) - if (SgAssignOp* op = isSgAssignOp(expr->get_expression())) - if (SgVarRefExp* var_ref = isSgVarRefExp( - op->get_lhs_operand())) - index = var_ref->get_symbol(); - - std::vector<SgVarRefExp *> array = substitute(code, index, NULL, - isSgNode(body_syms)); - - for (int j = 0; j < array.size(); j++) - array[j]->set_symbol(idxSym); - } - - SgStatement* body_ = isSgStatement( - recursiveFindReplacePreferedIdxs( - isSgNode((isSgForStatement(code)->get_loop_body())), - body_syms, param_syms, body, loop_idxs, globalscope)); - - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(code); - omega::CG_outputRepr* block = tnl->clone(); - tnli = static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - - isSgForStatement(tnli)->set_loop_body(body_); - body_->set_parent(tnli); - - if (idxSym) { - SgForInitStatement* list = - isSgForStatement(tnli)->get_for_init_stmt(); - SgStatementPtrList& initStatements = list->get_init_stmt(); - SgStatementPtrList::const_iterator j = initStatements.begin(); - const SgVariableSymbol* index; - - if (SgExprStatement *expr = isSgExprStatement(*j)) - if (SgAssignOp* op = isSgAssignOp(expr->get_expression())) - if (SgVarRefExp* var_ref = isSgVarRefExp( - op->get_lhs_operand())) - index = var_ref->get_symbol(); - - std::vector<SgVarRefExp *> array = substitute(tnli, index, NULL, - isSgNode(body_syms)); - - for (int j = 0; j < array.size(); j++) - array[j]->set_symbol(idxSym); - } - // std::cout << isSgNode(body_)->unparseToString() << "\n\n"; - if (att != NULL) - tnli->setAttribute("omega_comment", att); - - if (sync) { - SgName name_syncthreads("__syncthreads"); - SgFunctionSymbol * syncthreads_symbol = - globalscope->lookup_function_symbol(name_syncthreads); - - // Create a call to __syncthreads(): - SgFunctionCallExp * syncthreads_call = buildFunctionCallExp( - syncthreads_symbol, buildExprListExp()); - - SgExprStatement* stmt = buildExprStatement(syncthreads_call); - - /* if (SgBasicBlock* bb = isSgBasicBlock( - isSgForStatement(code)->get_loop_body())) - appendStatement(isSgStatement(stmt), bb); - - else if (SgStatement* ss = isSgStatement( - isSgForStatement(code)->get_loop_body())) { - SgBasicBlock* bb2 = buildBasicBlock(); - - isSgNode(ss)->set_parent(bb2); - appendStatement(ss, bb2); - - appendStatement(isSgStatement(stmt), bb2); - isSgNode(stmt)->set_parent(bb2); - isSgForStatement(code)->set_loop_body(bb2); - isSgNode(bb2)->set_parent(code); - } - */ - - SgBasicBlock* bb2 = buildBasicBlock(); - - bb2->append_statement(isSgStatement(tnli)); - bb2->append_statement(stmt); - /* SgNode* parent = code->get_parent(); - if(!isSgStatement(parent)) - throw loop_error("Parent not a statement"); - - if(isSgForStatement(parent)){ - if(SgStatement *ss = isSgForStatement(isSgForStatement(parent)->get_loop_body())){ - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(ss); - omega::CG_outputRepr* block= tnl->clone(); - - SgNode *new_ss = static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - SgBasicBlock* bb2 = buildBasicBlock(); - - isSgNode(new_ss)->set_parent(bb2); - appendStatement(isSgStatement(new_ss), bb2); - appendStatement(isSgStatement(stmt), bb2); - isSgNode(stmt)->set_parent(bb2); - - isSgStatement(parent)->replace_statement_from_basicBlock(ss, isSgStatement(bb2)); - - }else if(isSgBasicBlock(isSgForStatement(parent)->get_loop_body())) - isSgStatement(isSgForStatement(parent)->get_loop_body())->insert_statement(isSgStatement(code), stmt, false); - else - throw loop_error("parent statement type undefined!!"); - - } - else if(isSgBasicBlock(parent)) - isSgStatement(parent)->insert_statement(isSgStatement(code), stmt, false); - else - throw loop_error("parent statement type undefined!!"); - - //tnl->print(); - * - * - */ - sync = true; - return isSgNode(bb2); - - } else - return tnli; - } else if (isSgIfStmt(code)) { - SgStatement* body_ = isSgStatement( - recursiveFindReplacePreferedIdxs( - isSgNode((isSgIfStmt(code)->get_true_body())), - body_syms, param_syms, body, loop_idxs, globalscope)); - - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(code); - omega::CG_outputRepr* block = tnl->clone(); - tnli = static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - - isSgIfStmt(tnli)->set_true_body(body_); - - if ((isSgIfStmt(code)->get_false_body())) - isSgIfStmt(tnli)->set_false_body( - isSgStatement( - recursiveFindReplacePreferedIdxs( - isSgNode( - (isSgIfStmt(code)->get_false_body())), - body_syms, param_syms, body, loop_idxs, - globalscope))); - - return tnli; - } else if (isSgStatement(code) && !isSgBasicBlock(code)) { - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(code); - omega::CG_outputRepr* block = tnl->clone(); - tnli = static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - - return tnli; - - } else if (isSgBasicBlock(code)) { - SgStatementPtrList& tnl = isSgBasicBlock(code)->get_statements(); - - SgStatementPtrList::iterator temp; - clone = buildBasicBlock(); - bool sync_found = false; - for (SgStatementPtrList::const_iterator it = tnl.begin(); - it != tnl.end(); it++) { - - if (isSgForStatement(*it)) { - AstTextAttribute* att = - (AstTextAttribute*) (isSgNode(*it)->getAttribute( - "omega_comment")); - - std::string comment; - if (att != NULL) - comment = att->toString(); - - if (comment.find("~cuda~") != std::string::npos - && comment.find("preferredIdx: ") - != std::string::npos) { - std::string idx = comment.substr( - comment.find("preferredIdx: ") + 14, - std::string::npos); - if (idx.find(" ") != std::string::npos) - idx = idx.substr(0, idx.find(" ")); - //printf("sym_tab preferred index: %s\n", idx.c_str()); - if (loop_idxs.find(idx) != loop_idxs.end()) - idxSym = loop_idxs.find(idx)->second; - //Get the proc variable sybol for this preferred index - if (idxSym == 0) { - idxSym = body_syms->find_variable(idx.c_str()); - if (!idxSym) - idxSym = param_syms->find_variable(idx.c_str()); - //printf("idx not found: lookup %p\n", idxSym); - if (!idxSym) { - SgVariableDeclaration* defn = - buildVariableDeclaration( - SgName((char*) idx.c_str()), - buildIntType()); - //idxSym = new var_sym(type_s32, (char*)idx.c_str()); - SgInitializedNamePtrList& variables = - defn->get_variables(); - SgInitializedNamePtrList::const_iterator i = - variables.begin(); - SgInitializedName* initializedName = *i; - SgVariableSymbol* vs = new SgVariableSymbol( - initializedName); - prependStatement(defn, body); - vs->set_parent(body_syms); - body_syms->insert(SgName((char*) idx.c_str()), vs); - //printf("idx created and inserted\n"); - idxSym = vs; - } - //Now insert into our map for future - if (cudaDebug) - std::cout << idx << "\n\n"; - loop_idxs.insert(make_pair(idx, idxSym)); - - } - //See if we have a sync as well - if (comment.find("sync") != std::string::npos) { - //printf("Inserting sync after current block\n"); - sync = true; - } - - } - if (idxSym) { - SgForInitStatement* list = - isSgForStatement(*it)->get_for_init_stmt(); - SgStatementPtrList& initStatements = list->get_init_stmt(); - SgStatementPtrList::const_iterator j = - initStatements.begin(); - const SgVariableSymbol* index; - - if (SgExprStatement *expr = isSgExprStatement(*j)) - if (SgAssignOp* op = isSgAssignOp( - expr->get_expression())) - if (SgVarRefExp* var_ref = isSgVarRefExp( - op->get_lhs_operand())) - index = var_ref->get_symbol(); - - std::vector<SgVarRefExp *> array = substitute(*it, index, - NULL, isSgNode(body_syms)); - - for (int j = 0; j < array.size(); j++) - array[j]->set_symbol(idxSym); - - } - - SgStatement* body_ = - isSgStatement( - recursiveFindReplacePreferedIdxs( - isSgNode( - (isSgForStatement(*it)->get_loop_body())), - body_syms, param_syms, body, loop_idxs, - globalscope)); - - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(*it); - omega::CG_outputRepr* block = tnl->clone(); - tnli = - static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - - isSgForStatement(tnli)->set_loop_body(body_); - body_->set_parent(tnli); - if (idxSym) { - SgForInitStatement* list = - isSgForStatement(tnli)->get_for_init_stmt(); - SgStatementPtrList& initStatements = list->get_init_stmt(); - SgStatementPtrList::const_iterator j = - initStatements.begin(); - const SgVariableSymbol* index; - - if (SgExprStatement *expr = isSgExprStatement(*j)) - if (SgAssignOp* op = isSgAssignOp( - expr->get_expression())) - if (SgVarRefExp* var_ref = isSgVarRefExp( - op->get_lhs_operand())) - index = var_ref->get_symbol(); - - std::vector<SgVarRefExp *> array = substitute(tnli, index, - NULL, isSgNode(body_syms)); - - for (int j = 0; j < array.size(); j++) - array[j]->set_symbol(idxSym); - } - idxSym = 0; - // std::cout << isSgNode(body_)->unparseToString() << "\n\n"; - if (att != NULL) - tnli->setAttribute("omega_comment", att); - clone->append_statement(isSgStatement(tnli)); - if (sync) { - SgName name_syncthreads("__syncthreads"); - SgFunctionSymbol * syncthreads_symbol = - globalscope->lookup_function_symbol( - name_syncthreads); - - // Create a call to __syncthreads(): - SgFunctionCallExp * syncthreads_call = buildFunctionCallExp( - syncthreads_symbol, buildExprListExp()); - - SgExprStatement* stmt = buildExprStatement( - syncthreads_call); - - /* if (SgBasicBlock* bb = isSgBasicBlock( - isSgForStatement(code)->get_loop_body())) - appendStatement(isSgStatement(stmt), bb); - - else if (SgStatement* ss = isSgStatement( - isSgForStatement(code)->get_loop_body())) { - SgBasicBlock* bb2 = buildBasicBlock(); - - isSgNode(ss)->set_parent(bb2); - appendStatement(ss, bb2); - - appendStatement(isSgStatement(stmt), bb2); - isSgNode(stmt)->set_parent(bb2); - isSgForStatement(code)->set_loop_body(bb2); - isSgNode(bb2)->set_parent(code); - } - */ - - //SgBasicBlock* bb2 = buildBasicBlock(); - clone->append_statement(stmt); - /* SgNode* parent = code->get_parent(); - if(!isSgStatement(parent)) - throw loop_error("Parent not a statement"); - - if(isSgForStatement(parent)){ - if(SgStatement *ss = isSgForStatement(isSgForStatement(parent)->get_loop_body())){ - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(ss); - omega::CG_outputRepr* block= tnl->clone(); - - SgNode *new_ss = static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - SgBasicBlock* bb2 = buildBasicBlock(); - - isSgNode(new_ss)->set_parent(bb2); - appendStatement(isSgStatement(new_ss), bb2); - appendStatement(isSgStatement(stmt), bb2); - isSgNode(stmt)->set_parent(bb2); - - isSgStatement(parent)->replace_statement_from_basicBlock(ss, isSgStatement(bb2)); - - }else if(isSgBasicBlock(isSgForStatement(parent)->get_loop_body())) - isSgStatement(isSgForStatement(parent)->get_loop_body())->insert_statement(isSgStatement(code), stmt, false); - else - throw loop_error("parent statement type undefined!!"); - - } - else if(isSgBasicBlock(parent)) - isSgStatement(parent)->insert_statement(isSgStatement(code), stmt, false); - else - throw loop_error("parent statement type undefined!!"); - - //tnl->print(); - * - * - */ - sync = true; - // return isSgNode(bb2); - - } - - // return tnli; - } else if (isSgIfStmt(*it)) { - SgStatement* body_ = isSgStatement( - recursiveFindReplacePreferedIdxs( - isSgNode((isSgIfStmt(*it)->get_true_body())), - body_syms, param_syms, body, loop_idxs, - globalscope)); - - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(*it); - omega::CG_outputRepr* block = tnl->clone(); - tnli1 = - static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - - isSgIfStmt(tnli1)->set_true_body(body_); - - if ((isSgIfStmt(*it)->get_false_body())) - isSgIfStmt(tnli1)->set_false_body( - isSgStatement( - recursiveFindReplacePreferedIdxs( - isSgNode( - (isSgIfStmt(*it)->get_false_body())), - body_syms, param_syms, body, - loop_idxs, globalscope))); - - clone->append_statement(isSgStatement(tnli1)); - //return tnli; - } else if (isSgStatement(*it)) { - omega::CG_roseRepr * tnl = new omega::CG_roseRepr(*it); - omega::CG_outputRepr* block = tnl->clone(); - tnli2 = - static_cast<const omega::CG_roseRepr *>(block)->GetCode(); - - clone->append_statement(isSgStatement(tnli2)); - //return tnli; - - } - } - - return isSgNode(clone); - - } - - /* if (!isSgBasicBlock( - recursiveFindReplacePreferedIdxs(isSgNode(*it), body_syms, - param_syms, body, loop_idxs, globalscope))) { - SgStatement *to_push = isSgStatement( - recursiveFindReplacePreferedIdxs(isSgNode(*it), - body_syms, param_syms, body, loop_idxs, - globalscope, sync)); - clone->append_statement(to_push); - - if ((sync_found) && isSgForStatement(to_push)) { - SgName name_syncthreads("__syncthreads"); - SgFunctionSymbol * syncthreads_symbol = - globalscope->lookup_function_symbol( - name_syncthreads); - - // Create a call to __syncthreads(): - SgFunctionCallExp * syncthreads_call = buildFunctionCallExp( - syncthreads_symbol, buildExprListExp()); - - SgExprStatement* stmt = buildExprStatement( - syncthreads_call); - - clone->append_statement(isSgStatement(stmt)); - } - // std::cout<<isSgNode(*it)->unparseToString()<<"\n\n"; - } else { - - SgStatementPtrList& tnl2 = isSgBasicBlock( - recursiveFindReplacePreferedIdxs(isSgNode(*it), - body_syms, param_syms, body, loop_idxs, - globalscope))->get_statements(); - for (SgStatementPtrList::const_iterator it2 = tnl2.begin(); - it2 != tnl2.end(); it2++) { - clone->append_statement(*it2); - - sync_found = true; - // std::cout<<isSgNode(*it2)->unparseToString()<<"\n\n"; - } - } - - } - return isSgNode(clone); - } - */ -// return tnl; -} - -// loop_vars -> array references -// loop_idxs -> <idx_name,idx_sym> map for when we encounter a loop with a different preferredIndex -// dim_vars -> out param, fills with <old,new> var_sym pair for 2D array dimentions (messy stuff) -SgNode* swapVarReferences(SgNode* code, - std::set<const SgVariableSymbol *>& syms, SgSymbolTable* param, - SgSymbolTable* body, SgScopeStatement* body_stmt) { - //Iterate over every expression, looking up each variable and type - //reference used and possibly replacing it or adding it to our symbol - //table - // - //We use the built-in cloning helper methods to seriously help us with this! - - //Need to do a recursive mark - - std::set<const SgVariableSymbol *>::iterator myIterator; - for (myIterator = syms.begin(); myIterator != syms.end(); myIterator++) { - SgName var_name = (*myIterator)->get_name(); - std::string x = var_name.getString(); - - if ((param->find_variable(var_name) == NULL) - && (body->find_variable(var_name) == NULL)) { - SgInitializedName* decl = (*myIterator)->get_declaration(); - - SgVariableSymbol* dvs = new SgVariableSymbol(decl); - SgVariableDeclaration* var_decl = buildVariableDeclaration( - dvs->get_name(), dvs->get_type()); - - AstTextAttribute* att = (AstTextAttribute*) (isSgNode( - decl->get_declaration())->getAttribute("__shared__")); - if (isSgNode(decl->get_declaration())->attributeExists( - "__shared__")) - var_decl->get_declarationModifier().get_storageModifier().setCudaShared(); - - appendStatement(var_decl, body_stmt); - - dvs->set_parent(body); - body->insert(var_name, dvs); - } - - std::vector<SgVarRefExp *> array = substitute(code, *myIterator, NULL, - isSgNode(body)); - - SgVariableSymbol* var = (SgVariableSymbol*) (*myIterator); - for (int j = 0; j < array.size(); j++) - array[j]->set_symbol(var); - } - - return code; -} - -bool LoopCuda::validIndexes(int stmt, const std::vector<std::string>& idxs) { - for (int i = 0; i < idxs.size(); i++) { - bool found = false; - for (int j = 0; j < idxNames[stmt].size(); j++) { - if (strcmp(idxNames[stmt][j].c_str(), idxs[i].c_str()) == 0) { - found = true; - } - } - if (!found) { - return false; - } - } - return true; -} - -bool LoopCuda::cudaize_v2(std::string kernel_name, - std::map<std::string, int> array_dims, - std::vector<std::string> blockIdxs, - std::vector<std::string> threadIdxs) { - CG_outputBuilder *ocg = ir->builder(); - int stmt_num = 0; - if (cudaDebug) { - printf("cudaize_v2(%s, {", kernel_name.c_str()); - //for( - printf("}, blocks={"); - printVs(blockIdxs); - printf("}, thread={"); - printVs(threadIdxs); - printf("})\n"); - } - - this->array_dims = array_dims; - if (!validIndexes(stmt_num, blockIdxs)) { - throw std::runtime_error("One of the indexes in the block list was not " - "found in the current set of indexes."); - } - if (!validIndexes(stmt_num, threadIdxs)) { - throw std::runtime_error( - "One of the indexes in the thread list was not " - "found in the current set of indexes."); - } - if (blockIdxs.size() == 0) - throw std::runtime_error("Cudaize: Need at least one block dimention"); - int block_level = 0; - //Now, we will determine the actual size (if possible, otherwise - //complain) for the block dimentions and thread dimentions based on our - //indexes and the relations for our stmt; - for (int i = 0; i < blockIdxs.size(); i++) { - int level = findCurLevel(stmt_num, blockIdxs[i]); - int ub, lb; - CG_outputRepr* ubrepr = extractCudaUB(stmt_num, level, ub, lb); - if (lb != 0) { - //attempt to "normalize" the loop with an in-place tile and then re-check our bounds - if (cudaDebug) - printf( - "Cudaize: doing tile at level %d to try and normalize lower bounds\n", - level); - tile(stmt_num, level, 1, level, CountedTile); - idxNames[stmt_num].insert(idxNames[stmt_num].begin() + (level), ""); //TODO: possibly handle this for all sibling stmts - ubrepr = extractCudaUB(stmt_num, level, ub, lb); - } - if (lb != 0) { - char buf[1024]; - sprintf(buf, - "Cudaize: Loop at level %d does not have 0 as it's lower bound", - level); - throw std::runtime_error(buf); - } - if (ub < 0) { - char buf[1024]; - sprintf(buf, - "Cudaize: Loop at level %d does not have a hard upper bound", - level); - //Anand: Commenting out error indication for lack of constant upper bound - //throw std::runtime_error(buf); - } - if (cudaDebug) - printf("block idx %s level %d lb: %d ub %d\n", blockIdxs[i].c_str(), - level, lb, ub); - if (i == 0) { - block_level = level; - if (ubrepr == NULL) { - cu_bx = ub + 1; - cu_bx_repr = NULL; - } else { - cu_bx = 0; - cu_bx_repr = ocg->CreatePlus(ubrepr, ocg->CreateInt(1)); - } - idxNames[stmt_num][level - 1] = "bx"; - } else if (i == 1) { - if (ubrepr == NULL) { - cu_by = ub + 1; - cu_by_repr = NULL; - } else { - cu_by = 0; - cu_by_repr = ocg->CreatePlus(ubrepr, ocg->CreateInt(1)); - } - idxNames[stmt_num][level - 1] = "by"; - } - } - if (!cu_by && !cu_by_repr) - block_level = 0; - int thread_level1 = 0; - int thread_level2 = 0; - for (int i = 0; i < threadIdxs.size(); i++) { - int level = findCurLevel(stmt_num, threadIdxs[i]); - int ub, lb; - CG_outputRepr* ubrepr = extractCudaUB(stmt_num, level, ub, lb); - if (lb != 0) { - //attempt to "normalize" the loop with an in-place tile and then re-check our bounds - if (cudaDebug) - printf( - "Cudaize: doing tile at level %d to try and normalize lower bounds\n", - level); - tile(stmt_num, level, 1, level, CountedTile); - idxNames[stmt_num].insert(idxNames[stmt_num].begin() + (level), ""); - ubrepr = extractCudaUB(stmt_num, level, ub, lb); - } - if (lb != 0) { - char buf[1024]; - sprintf(buf, - "Cudaize: Loop at level %d does not have 0 as it's lower bound", - level); - throw std::runtime_error(buf); - } - if (ub < 0) { - char buf[1024]; - sprintf(buf, - "Cudaize: Loop at level %d does not have a hard upper bound", - level); - //Anand: Commenting out error indication for lack of constant upper bound - //throw std::runtime_error(buf); - } - - if (cudaDebug) - printf("thread idx %s level %d lb: %d ub %d\n", - threadIdxs[i].c_str(), level, lb, ub); - if (i == 0) { - thread_level1 = level; - if (ubrepr == NULL) { - cu_tx = ub + 1; - cu_tx_repr = NULL; - } else { - cu_tx = 0; - cu_tx_repr = ocg->CreatePlus(ubrepr, ocg->CreateInt(1)); - } - idxNames[stmt_num][level - 1] = "tx"; - } else if (i == 1) { - thread_level2 = level; - if (ubrepr == NULL) { - cu_ty = ub + 1; - cu_ty_repr = NULL; - } else { - cu_ty = 0; - cu_ty_repr = ocg->CreatePlus(ubrepr, ocg->CreateInt(1)); - } - idxNames[stmt_num][level - 1] = "ty"; - } else if (i == 2) { - if (ubrepr == NULL) { - cu_tz = ub + 1; - cu_tz_repr = NULL; - } else { - cu_tz = 0; - cu_tz_repr = ocg->CreatePlus(ubrepr, ocg->CreateInt(1)); - } - idxNames[stmt_num][level - 1] = "tz"; - } - } - if (!cu_ty && !cu_ty_repr) - thread_level1 = 0; - if (!cu_tz && !cu_tz_repr) - thread_level2 = 0; - - //Make changes to nonsplitlevels - const int m = stmt.size(); - for (int i = 0; i < m; i++) { - if (block_level) { - //stmt[i].nonSplitLevels.append((block_level)*2); - stmt_nonSplitLevels[i].push_back((block_level) * 2); - } - if (thread_level1) { - //stmt[i].nonSplitLevels.append((thread_level1)*2); - stmt_nonSplitLevels[i].push_back((thread_level1) * 2); - } - if (thread_level2) { - //stmt[i].nonSplitLevels.append((thread_level1)*2); - stmt_nonSplitLevels[i].push_back((thread_level1) * 2); - } - } - - if (cudaDebug) { - printf("Codegen: current names: "); - printVS(idxNames[stmt_num]); - } - //Set codegen flag - code_gen_flags |= GenCudaizeV2; - - //Save array dimention sizes - this->array_dims = array_dims; - cu_kernel_name = kernel_name.c_str(); - -} - -/* - * setupConstantVar - * handles constant variable declaration - * and adds a global constant variable - * parameters: - * constant - the constant_memory_mapping object for this loop - * arr_def - the VarDefs object for the mapped variable - * globals - Rose Global variables - * i - an index to keep new variable names unique - * symtab - global symbol table - */ -static void setupConstantVar(constant_memory_mapping* constant, VarDefs* arr_def, SgGlobal* globals, int i, SgSymbolTable* symtab) { - char* buf1 = new char[32]; - snprintf(buf1, 32, "cs%dRef", i+1); - arr_def->secondName = buf1; - - char buf2[64]; - snprintf(buf2, 64, "__device__ __constant__ float"); - - SgVariableDeclaration* consvar_decl = buildVariableDeclaration( - SgName(std::string(buf1)), buildArrayType( - buildOpaqueType(SgName(buf2),globals), - arr_def->size_expr)); - SgInitializedNamePtrList& variables = consvar_decl->get_variables(); - SgInitializedNamePtrList::const_iterator j = variables.begin(); - SgInitializedName* initializedName = *j; - SgVariableSymbol* consvar_sym = new SgVariableSymbol(initializedName); - prependStatement(consvar_decl, globals); - - consvar_sym->set_parent(symtab); - symtab->insert(SgName(std::string(buf1)), consvar_sym); - - constant->set_mapped_symbol(arr_def->original_name.c_str(), consvar_sym); - constant->set_vardef(arr_def->original_name.c_str(), arr_def); -} - -/* - * cudaBindConstantVar - * allocs a variable to constant memory - * constant - the constant mapping object - * arr_def - the VarDefs abject - * globals - global symbol table - * stmt_list - the GPU functions' statement list - */ -static void cudaBindConstantVar(constant_memory_mapping* constant, VarDefs* arr_def, SgGlobal* globals, SgStatementPtrList* stmt_list) { - SgName cudaMemcpyToSymbol_name("cudaMemcpyToSymbol"); - SgFunctionDeclaration* cudaMemcpyToSymbol_decl = buildNondefiningFunctionDeclaration( - cudaMemcpyToSymbol_name, buildVoidType(), buildFunctionParameterList(), globals); - SgExprListExp* args = buildExprListExp(); - args->append_expression(buildCastExp(constant->get_mapped_symbol_exp(arr_def->original_name.c_str()), - buildPointerType(buildVoidType()))); - args->append_expression(buildVarRefExp(arr_def->in_data)); - args->append_expression(arr_def->size_expr); - stmt_list->push_back(buildExprStatement( - buildFunctionCallExp(buildFunctionRefExp(cudaMemcpyToSymbol_decl), args))); -} - -static void consmapArrayRefs(constant_memory_mapping* constant, std::vector<IR_ArrayRef*>* refs, SgGlobal* globals, IR_Code* ir, CG_roseBuilder* ocg) { - // if constant mapping is not being used, ignore this function - if(constant == NULL) return; - for(int i = 0; i < refs->size(); i++) { - IR_ArrayRef* aref = (*refs)[i]; - if(constant->is_array_mapped(aref->name().c_str())) { - // get array reference dimensions - int dims = aref->symbol()->n_dim(); - if(dims > 2) { - printf(" \n CHiLL does not handle constant memory mapping for more than 2D arrays.\n"); - return; - } - - SgExpression* varexp = constant->get_mapped_symbol_exp(aref->name().c_str()); - SgExpression* index_exp; - // build index expression - if(dims == 1) { - index_exp = static_cast<omega::CG_roseRepr*>(aref->index(0)->clone())->GetExpression(); - } - if(dims == 2) { - VarDefs* arr_def = constant->get_vardef(aref->name().c_str()); - CG_outputRepr* i0 = aref->index(0)->clone(); - CG_outputRepr* i1 = aref->index(1)->clone(); - CG_outputRepr* sz = new CG_roseRepr(buildIntVal(arr_def->size_multi_dim[0])); - CG_outputRepr* exp = ocg->CreatePlus(ocg->CreateTimes(sz->clone(), i0), i1); - index_exp = static_cast<omega::CG_roseRepr*>(exp->clone())->GetExpression(); - } - ir->ReplaceExpression(aref, new CG_roseRepr(buildPntrArrRefExp(varexp, index_exp))); - } - } -} - -/* - * setupTexmappingVar - * handles texture variable declaration - * and adds a global texture object - * parameters: - * texture - the texture_memory_mapping object - * arr_def - the VarDefs object for the mapped variable - * globals - Rose Global variables - * i - an index to keep the new variable names unique - * devptr_sym - the devptr that the original variable is associated with - * symtab - GPU function symbol table - */ -static void setupTexmappingVar(texture_memory_mapping* texture, VarDefs* arr_def, SgGlobal* globals, int i, SgVariableSymbol* devptr_sym, SgSymbolTable* symtab) { - char* buf1 = new char[32]; - snprintf(buf1, 32, "tex%dRef", i+1); - arr_def->secondName = buf1; - - char buf2[64]; - // single-dimensional - snprintf(buf2, 64, "texture<float, %d, cudaReadModeElementType>", 1); - // multi-dimensional - // snprintf(buf2, 64, "texture<float, %d, cudaReadModeElemetType>", (int)(arr_def->size_multi_dim.size())); //*/ - - SgVariableDeclaration* texvar_decl = buildVariableDeclaration(SgName(std::string(buf1)), buildOpaqueType(buf2, globals)); - - SgInitializedNamePtrList& variables = texvar_decl->get_variables(); - SgInitializedNamePtrList::const_iterator j = variables.begin(); - SgInitializedName* initializedName = *j; - SgVariableSymbol* texvar_sym = new SgVariableSymbol(initializedName); - prependStatement(texvar_decl, globals); - - texvar_sym->set_parent(symtab); - symtab->insert(SgName(buf1), texvar_sym); - - texture->set_mapped_symbol(arr_def->original_name.c_str(), texvar_sym); - texture->set_devptr_symbol(arr_def->original_name.c_str(), devptr_sym); - texture->set_vardef(arr_def->original_name.c_str(), arr_def); -} - - -/* - * One dimensional version of cudaBindTexture - * see cudaBindTexture for details - */ -static SgFunctionCallExp* cudaBindTexture1D(texture_memory_mapping* texture, VarDefs* arr_def, SgGlobal* globals) { - SgName cudaBindTexture_name("cudaBindTexture"); - SgFunctionDeclaration* cudaBindTexture_decl = buildNondefiningFunctionDeclaration( - cudaBindTexture_name, buildVoidType(), buildFunctionParameterList(), globals); - - SgExprListExp* args = buildExprListExp(); - args->append_expression(buildIntVal(0)); - args->append_expression(texture->get_mapped_symbol_exp(arr_def->original_name.c_str())); - args->append_expression(texture->get_devptr_symbol_exp(arr_def->original_name.c_str())); - args->append_expression(arr_def->size_expr); - return buildFunctionCallExp(buildFunctionRefExp(cudaBindTexture_decl), args); -} - -/* - * Two dimensional version of cudaBindTexture - * see cudaBindTexture for details - */ -//static SgFunctionCallExp* cudaBindTexture2D(texture_memory_mapping* texture, VarDefs* arr_def, SgGlobal* globals) { -// SgName cudaBindTexture_name("cudaBindTexture2D"); -// SgFunctionDeclaration* cudaBindTexture_decl = buildNondefiningFunctionDeclaration( -// cudaBindTexture_name, buildVoidType(), buildFunctionParameterList(), globals); -// -// SgExprListExp* args = buildExprListExp(); -// args->append_expression(buildIntVal(0)); -// args->append_expression(texture->get_tex_mapped_symbol_exp(arr_def->original_name.c_str())); -// args->append_expression(texture->get_devptr_symbol_exp(arr_def->original_name.c_str())); -// args->append_expression(buildIntVal(texture->get_dim_length(arr_def->original_name.c_str(), 0))); -// args->append_expression(buildIntVal(texture->get_dim_length(arr_def->original_name.c_str(), 1))); -// args->append_expression(arr_def->size_expr); -// return buildFunctionCallExp(buildFunctionRefExp(cudaBindTexture_decl), args); -//} - -/* - * cudaBindTexture - * binds a variable to a texture - * parameters: - * texture - the texture mapping object - * arr_def - the VarDefs object - * globals - global symbol table - * stmt_list - the GPU functions' statement list - * notes: - * only supports binding 1D textures, may need to consider cudaBindTexture2D for 2D textures - */ -static void cudaBindTexture(texture_memory_mapping* texture, VarDefs* arr_def, SgGlobal* globals, SgStatementPtrList* stmt_list) { - //int dims = (int)(arr_def->size_multi_dim.size()); - //int dims = texture->get_dims(arr_def->original_name.c_str()); - //if(dims == 1) - stmt_list->push_back( - buildExprStatement(cudaBindTexture1D(texture, arr_def, globals))); - //if(dims == 2) - // stmt_list->push_back( - // buildExprStatement(cudaBindTexture2D(texture, arr_def, globals))); -} - -/* - * texmapArrayRefs - * maps array reference expresions of texture mapped variables to the tex1D function - * parameters: - * texture - the texture mapping object - * refs - a list of all array read operations - * globals - global symbol table - * ir - handles IR_Code operations - * ocg - handles CG_roseBuilder operations -**/ -static void texmapArrayRefs(texture_memory_mapping* texture, std::vector<IR_ArrayRef*>* refs, SgGlobal* globals, IR_Code* ir, CG_roseBuilder *ocg) { - // if texture mapping is not being used, ignore this function - if(texture == NULL) return; - for(int i = 0; i < refs->size(); i++) { - IR_ArrayRef* aref = (*refs)[i]; - if(texture->is_array_mapped(aref->name().c_str())) { - - // get array dimensions - VarDefs* arr_def = texture->get_vardef(aref->name().c_str()); - int dims = aref->symbol()->n_dim(); - if(dims > 2) { - printf(" \n CHiLL does not handle texture mapping for more than 2D arrays.\n"); - // TODO throw some sort of error. or handle in texture_copy function - return; - } - - // build texture lookup function declaration - char texNDfetch_strName[16]; - sprintf(texNDfetch_strName, "tex%dDfetch", 1); // for now, only support tex1Dfetch - //sprintf(texNDfetch_strName, "tex%dDfetch", dims); - SgFunctionDeclaration* fetch_decl = buildNondefiningFunctionDeclaration( - SgName(texNDfetch_strName), buildFloatType(), buildFunctionParameterList(), globals); - - // build args - SgExprListExp* args = buildExprListExp(); - args->append_expression(texture->get_mapped_symbol_exp(aref->name().c_str())); - - // set indexing args - //for(int i = 0; i < dims; i++) { - // args->append_expression((static_cast<omega::CG_roseRepr*>(aref->index(i)->clone()))->GetExpression()); - //} - if(dims == 1) { - args->append_expression(static_cast<omega::CG_roseRepr*>(aref->index(0)->clone())->GetExpression()); - } - else if(dims == 2) { - CG_outputRepr* i0 = aref->index(0)->clone(); - CG_outputRepr* i1 = aref->index(1)->clone(); - CG_outputRepr* sz = new CG_roseRepr(buildIntVal(arr_def->size_multi_dim[0])); - CG_outputRepr* expr = ocg->CreatePlus(ocg->CreateTimes(sz->clone(), i0), i1); - args->append_expression(static_cast<omega::CG_roseRepr*>(expr->clone())->GetExpression()); - } - - // build function call and replace original array ref - SgFunctionCallExp* fetch_call = buildFunctionCallExp(buildFunctionRefExp(fetch_decl), args); - ir->ReplaceExpression(aref, new CG_roseRepr(fetch_call)); - } - } -} - -SgNode* LoopCuda::cudaize_codegen_v2() { - if(cudaDebug) - printf("cudaize codegen V2\n"); - CG_roseBuilder *ocg = dynamic_cast<CG_roseBuilder*>(ir->builder()); - if (!ocg) - return false; - - //protonu--adding an annote to track texture memory type - //ANNOTE(k_cuda_texture_memory, "cuda texture memory", TRUE); - //ANNOTE(k_cuda_constant_memory, "cuda constant memory", TRUE); - int tex_mem_on = 0; - int cons_mem_on = 0; - - - - CG_outputRepr* repr; - std::vector<VarDefs> arrayVars; - std::vector<VarDefs> localScopedVars; - - std::vector<IR_ArrayRef *> ro_refs; - std::vector<IR_ArrayRef *> wo_refs; - std::set<std::string> uniqueRefs; - std::set<std::string> uniqueWoRefs; - std::set<const SgVariableSymbol *> syms; - std::set<const SgVariableSymbol *> psyms; - std::set<const SgVariableSymbol *> pdSyms; - SgStatementPtrList* replacement_list = new SgStatementPtrList; - - for (int j = 0; j < stmt.size(); j++) { - std::vector<IR_ArrayRef *> refs = ir->FindArrayRef(stmt[j].code); - for (int i = 0; i < refs.size(); i++) { - //printf("ref %s wo %d\n", static_cast<const char*>(refs[i]->name()), refs[i]->is_write()); - SgVariableSymbol* var = body_symtab->find_variable( - SgName((char*) refs[i]->name().c_str())); - SgVariableSymbol* var2 = parameter_symtab->find_variable( - SgName((char*) refs[i]->name().c_str())); - - //If the array is not a parameter, then it's a local array and we - //want to recreate it as a stack variable in the kernel as opposed to - //passing it in. - if (var != NULL) { - //anand-- needs modification, if variable is parameter it wont be part of the - // block's symbol table but the functiond definition's symbol table - - continue; - } - if (uniqueRefs.find(refs[i]->name()) == uniqueRefs.end()) { - - uniqueRefs.insert(refs[i]->name()); - if (refs[i]->is_write()) { - uniqueWoRefs.insert(refs[i]->name()); - wo_refs.push_back(refs[i]); - } else - ro_refs.push_back(refs[i]); - } - if (refs[i]->is_write() - && uniqueWoRefs.find(refs[i]->name()) - == uniqueWoRefs.end()) { - uniqueWoRefs.insert(refs[i]->name()); - wo_refs.push_back(refs[i]); - //printf("adding %s to wo\n", static_cast<const char*>(refs[i]->name())); - } - pdSyms.insert((const SgVariableSymbol*) var2); - } - } - - if (cudaDebug) { - printf("reading from array "); - for (int i = 0; i < ro_refs.size(); i++) - printf("'%s' ", ro_refs[i]->name().c_str()); - printf("and writing to array "); - for (int i = 0; i < wo_refs.size(); i++) - printf("'%s' ", wo_refs[i]->name().c_str()); - printf("\n"); - } - const char* gridName = "dimGrid"; - const char* blockName = "dimBlock"; - - //TODO: Could allow for array_dims_vars to be a mapping from array - //references to to variable names that define their length. - SgVariableSymbol* dim1 = 0; - SgVariableSymbol* dim2 = 0; - - for (int i = 0; i < wo_refs.size(); i++) { - //TODO: Currently assume all arrays are floats of one or two dimentions - SgVariableSymbol* outArray = 0; - std::string name = wo_refs[i]->name(); - outArray = body_symtab->find_variable(SgName((char*) name.c_str())); - int size_n_d; - if (outArray == NULL) - outArray = parameter_symtab->find_variable( - SgName((char*) name.c_str())); - - VarDefs v; - v.size_multi_dim = std::vector<int>(); - char buf[32]; - snprintf(buf, 32, "devO%dPtr", i + 1); - v.name = buf; - if (isSgPointerType(outArray->get_type())) { - if (isSgArrayType( - isSgNode( - isSgPointerType(outArray->get_type())->get_base_type()))) { - // v.type = ((array_type *)(((ptr_type *)(outArray->type()))->ref_type()))->elem_type(); - SgType* t = - isSgPointerType(outArray->get_type())->get_base_type(); - /* SgExprListExp* dimList = t->get_dim_info(); - SgExpressionPtrList::iterator j= dimList->get_expressions().begin(); - SgExpression* expr=NULL; - for (; j != dimList->get_expressions().end(); j++) - expr = *j; - */ - while (isSgArrayType(t)) - t = isSgArrayType(t)->get_base_type(); - - if (!isSgType(t)) { - char buf[1024]; - sprintf(buf, "CudaizeCodeGen: Array type undetected!"); - throw std::runtime_error(buf); - - } - - v.type = t; - } else - v.type = isSgPointerType(outArray->get_type())->get_base_type(); - } else if (isSgArrayType(outArray->get_type())) { - if (isSgArrayType( - isSgNode( - isSgArrayType(outArray->get_type())->get_base_type()))) { - // v.type = ((array_type *)(((ptr_type *)(outArray->type()))->ref_type()))->elem_type(); - SgType* t = - isSgArrayType(outArray->get_type())->get_base_type(); - /* SgExprListExp* dimList = t->get_dim_info(); - SgExpressionPtrList::iterator j= dimList->get_expressions().begin(); - SgExpression* expr=NULL; - for (; j != dimList->get_expressions().end(); j++) - expr = *j; - */ - while (isSgArrayType(t)) - t = isSgArrayType(t)->get_base_type(); - - if (!isSgType(t)) { - char buf[1024]; - sprintf(buf, "CudaizeCodeGen: Array type undetected!"); - throw std::runtime_error(buf); - - } - - v.type = t; - } else - v.type = isSgArrayType(outArray->get_type())->get_base_type(); - } else - v.type = buildFloatType(); - v.tex_mapped = false; - v.cons_mapped = false; - v.original_name = wo_refs[i]->name(); - //Size of the array = dim1 * dim2 * num bytes of our array type - - //If our input array is 2D (non-linearized), we want the actual - //dimentions of the array - CG_outputRepr* size; - //Lookup in array_dims - std::map<std::string, int>::iterator it = array_dims.find(name.c_str()); - if (isSgPointerType(outArray->get_type()) - && isSgArrayType( - isSgNode( - isSgPointerType(outArray->get_type())->get_base_type()))) { - SgType* t = isSgPointerType(outArray->get_type())->get_base_type(); - /* SgExprListExp* dimList = t->get_dim_info(); - SgExpressionPtrList::iterator j= dimList->get_expressions().begin(); - SgExpression* expr=NULL; - for (; j != dimList->get_expressions().end(); j++) - expr = *j; - */ - if (isSgIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - size_n_d = (int) isSgIntVal(lhs)->get_value() + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - size_n_d = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - size_n_d = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - size_n_d = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - t = isSgArrayType(t)->get_base_type(); - while (isSgArrayType(t)) { - int dim; - if (isSgIntVal(isSgArrayType(t)->get_index())) - dim = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - dim = (int) isSgIntVal(lhs)->get_value() - + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - dim = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - dim = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - dim = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - size_n_d *= dim; - v.size_multi_dim.push_back(dim); - t = isSgArrayType(t)->get_base_type(); - } - //v.size_2d = (int) (isSgIntVal(t->get_index())->get_value()); - - if (cudaDebug) - printf("Detected Multi-dimensional array sized of %d for %s\n", - size_n_d, (char*) wo_refs[i]->name().c_str()); - size = ocg->CreateInt(size_n_d); - } else if (isSgArrayType(outArray->get_type()) - && isSgArrayType( - isSgNode( - isSgArrayType(outArray->get_type())->get_base_type()))) { - SgType* t = outArray->get_type(); - /* SgExprListExp* dimList = t->get_dim_info(); - SgExpressionPtrList::iterator j= dimList->get_expressions().begin(); - SgExpression* expr=NULL; - for (; j != dimList->get_expressions().end(); j++) - expr = *j; - */ - - if (isSgIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - size_n_d = (int) isSgIntVal(lhs)->get_value() + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - size_n_d = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - size_n_d = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - size_n_d = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - t = isSgArrayType(t)->get_base_type(); - while (isSgArrayType(t)) { - int dim; - if (isSgIntVal(isSgArrayType(t)->get_index())) - dim = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - dim = (int) isSgIntVal(lhs)->get_value() - + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - dim = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - dim = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - dim = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - size_n_d *= dim; - v.size_multi_dim.push_back(dim); - t = isSgArrayType(t)->get_base_type(); - } - - //v.size_2d = (int) (isSgIntVal(t->get_index())->get_value()); - - if (cudaDebug) - printf("Detected Multi-Dimensional array sized of %d for %s\n", - size_n_d, (char*) wo_refs[i]->name().c_str()); - size = ocg->CreateInt(size_n_d); - } else if (it != array_dims.end()) { - int ref_size = it->second; - //size = - // ocg->CreateInt( - // isSgIntVal( - // isSgArrayType(outArray->get_type())->get_index())->get_value()); - //v.size_2d = isSgArrayType(outArray->get_type())->get_rank(); - //v.var_ref_size = ref_size; - size = ocg->CreateInt(ref_size); - - } else { - if (dim1) { - size = ocg->CreateTimes( - new CG_roseRepr(isSgExpression(buildVarRefExp(dim1))), - new CG_roseRepr(isSgExpression(buildVarRefExp(dim2)))); - } else { - char buf[1024]; - sprintf(buf, - "CudaizeCodeGen: Array reference %s does not have a " - "detectable size or specififed dimentions", - name.c_str()); - throw std::runtime_error(buf); - } - } - - v.size_expr = - static_cast<CG_roseRepr*>(ocg->CreateTimes(size, - new omega::CG_roseRepr( - isSgExpression(buildSizeOfOp(v.type)))))->GetExpression(); - - v.in_data = 0; - v.out_data = outArray; - //Check for in ro_refs and remove it at this point - std::vector<IR_ArrayRef *>::iterator it_; - for (it_ = ro_refs.begin(); it_ != ro_refs.end(); it_++) { - if ((*it_)->name() == wo_refs[i]->name()) { - break; - } - } - if (it_ != ro_refs.end()) { - v.in_data = outArray; - ro_refs.erase(it_); - } - - arrayVars.push_back(v); - - } - - //protonu-- assuming that all texture mapped memories were originally read only mems - //there should be safety checks for that, will implement those later - - for (int i = 0; i < ro_refs.size(); i++) { - SgVariableSymbol* inArray = 0; - std::string name = ro_refs[i]->name(); - inArray = body_symtab->find_variable(SgName((char*) name.c_str())); - if (inArray == NULL) - inArray = parameter_symtab->find_variable( - SgName((char*) name.c_str())); - - VarDefs v; - v.size_multi_dim = std::vector<int>(); - char buf[32]; - snprintf(buf, 32, "devI%dPtr", i + 1); - v.name = buf; - int size_n_d; - if (isSgPointerType(inArray->get_type())) { - if (isSgArrayType( - isSgNode( - isSgPointerType(inArray->get_type())->get_base_type()))) { - - SgType* t = - isSgPointerType(inArray->get_type())->get_base_type(); - - while (isSgArrayType(t)) - t = isSgArrayType(t)->get_base_type(); - - if (!isSgType(t)) { - char buf[1024]; - sprintf(buf, "CudaizeCodeGen: Array type undetected!"); - throw std::runtime_error(buf); - - } - v.type = t; - } else - v.type = isSgPointerType(inArray->get_type())->get_base_type(); - } else if (isSgArrayType(inArray->get_type())) { - if (isSgArrayType( - isSgNode( - isSgArrayType(inArray->get_type())->get_base_type()))) { - - SgType* t = inArray->get_type(); - while (isSgArrayType(t)) - t = isSgArrayType(t)->get_base_type(); - - if (!isSgType(t)) { - char buf[1024]; - sprintf(buf, "CudaizeCodeGen: Array type undetected!"); - throw std::runtime_error(buf); - - } - v.type = t; - } else - v.type = isSgArrayType(inArray->get_type())->get_base_type(); - } - - else - v.type = buildFloatType(); - - v.tex_mapped = false; - v.cons_mapped = false; - v.original_name = ro_refs[i]->name(); - - //derick -- adding texture and constant mapping - if ( texture != NULL) - v.tex_mapped = (texture->is_array_mapped(name.c_str()))? true:false; //protonu-track tex mapped vars - if (v.tex_mapped){ - printf("this variable %s is mapped to texture memory", name.c_str()); - } - //derick -- this is commented out until constant memory is implemeted - if ( constant_mem != NULL) - v.cons_mapped = (constant_mem->is_array_mapped(name.c_str()))? true:false; //protonu-track tex mapped vars - if (v.cons_mapped){ - printf("this variable %s is mapped to constant memory", name.c_str()); - } - - //Size of the array = dim1 * dim2 * num bytes of our array type - //If our input array is 2D (non-linearized), we want the actual - //dimentions of the array (as it might be less than cu_n - CG_outputRepr* size; - //Lookup in array_dims - std::map<std::string, int>::iterator it = array_dims.find(name.c_str()); - if (isSgPointerType(inArray->get_type()) - && isSgArrayType( - isSgPointerType(inArray->get_type())->get_base_type())) { - //SgArrayType* t = isSgArrayType(isSgArrayType(inArray->get_type())->get_base_type()); - //v.size_2d = t->get_rank(); - SgType* t = isSgPointerType(inArray->get_type())->get_base_type(); - /* SgExprListExp* dimList = t->get_dim_info(); - SgExpressionPtrList::iterator j= dimList->get_expressions().begin(); - SgExpression* expr=NULL; - for (; j != dimList->get_expressions().end(); j++) - expr = *j; - */ - //v.size_2d = 1; - if (isSgIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - size_n_d = (int) isSgIntVal(lhs)->get_value() + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - size_n_d = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - size_n_d = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - size_n_d = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - t = isSgArrayType(t)->get_base_type(); - while (isSgArrayType(t)) { - int dim; - if (isSgIntVal(isSgArrayType(t)->get_index())) - dim = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - dim = (int) isSgIntVal(lhs)->get_value() - + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - dim = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - dim = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - dim = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - size_n_d *= dim; - v.size_multi_dim.push_back(dim); - t = isSgArrayType(t)->get_base_type(); - } - if (cudaDebug) - printf("Detected Multi-dimensional array sized of %d for %s\n", - size_n_d, (char*) ro_refs[i]->name().c_str()); - size = ocg->CreateInt(size_n_d); - } else if (isSgArrayType(inArray->get_type()) - && isSgArrayType( - isSgArrayType(inArray->get_type())->get_base_type())) { - //SgArrayType* t = isSgArrayType(isSgArrayType(inArray->get_type())->get_base_type()); - //v.size_2d = t->get_rank(); - SgType* t = inArray->get_type(); - /* SgExprListExp* dimList = t->get_dim_info(); - SgExpressionPtrList::iterator j= dimList->get_expressions().begin(); - SgExpression* expr=NULL; - for (; j != dimList->get_expressions().end(); j++) - expr = *j; - */ - - if (isSgIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = - (int) (isSgLongIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal(isSgArrayType(t)->get_index())) - size_n_d = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - size_n_d = (int) isSgIntVal(lhs)->get_value() + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - size_n_d = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - size_n_d = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - size_n_d = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - size_n_d = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - t = isSgArrayType(t)->get_base_type(); - while (isSgArrayType(t)) { - int dim; - if (isSgIntVal(isSgArrayType(t)->get_index())) - dim = - (int) (isSgIntVal(isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgLongIntVal(isSgArrayType(t)->get_index())) - dim = (int) (isSgLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())) - dim = (int) (isSgUnsignedLongLongIntVal( - isSgArrayType(t)->get_index())->get_value()); - else if (isSgAddOp(isSgArrayType(t)->get_index())) { - SgAddOp *op_add = isSgAddOp(isSgArrayType(t)->get_index()); - - SgExpression *lhs = op_add->get_lhs_operand(); - SgExpression *rhs = op_add->get_rhs_operand(); - - if (isSgIntVal(lhs)) - dim = (int) isSgIntVal(lhs)->get_value() - + (int) (isSgIntVal(rhs)->get_value()); - else if (isSgUnsignedIntVal(lhs)) - dim = (int) isSgUnsignedIntVal(lhs)->get_value() - + (int) isSgUnsignedIntVal(rhs)->get_value(); - else if (isSgUnsignedLongVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgUnsignedLongVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongLongIntVal(lhs)) - dim = (int) (isSgLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongVal(rhs)->get_value()); - else if (isSgLongIntVal(lhs)) - dim = (int) (isSgLongIntVal(lhs)->get_value() - + isSgLongIntVal(rhs)->get_value()); - else if (isSgUnsignedLongLongIntVal(lhs)) - dim = - (int) (isSgUnsignedLongLongIntVal(lhs)->get_value() - + isSgUnsignedLongLongIntVal(rhs)->get_value()); - - } - size_n_d *= dim; - v.size_multi_dim.push_back(dim); - t = isSgArrayType(t)->get_base_type(); - } - if (cudaDebug) - printf("Detected Multi-Dimensional array sized of %d for %s\n", - size_n_d, (char*) ro_refs[i]->name().c_str()); - size = ocg->CreateInt(size_n_d); - } - - else if (it != array_dims.end()) { - int ref_size = it->second; - // v.var_ref_size = ref_size; - size = ocg->CreateInt(ref_size); - } else { - if (dim1) { - size = ocg->CreateTimes( - new CG_roseRepr(isSgExpression(buildVarRefExp(dim1))), - new CG_roseRepr(isSgExpression(buildVarRefExp(dim2)))); - } else { - char buf[1024]; - sprintf(buf, - "CudaizeCodeGen: Array reference %s does not have a " - "detectable size or specififed dimentions", - name.c_str()); - throw std::runtime_error(buf); - } - } - v.size_expr = - static_cast<CG_roseRepr*>(ocg->CreateTimes(size, - new omega::CG_roseRepr( - isSgExpression(buildSizeOfOp(v.type)))))->GetExpression(); - - v.in_data = inArray; - v.out_data = 0; - arrayVars.push_back(v); - } - - if (arrayVars.size() < 2) { - fprintf(stderr, - "cudaize error: Did not find two arrays being accessed\n"); - return false; - } - - //protonu--debugging tool--the printf statement - //tex_mem_on signals use of tex mem - /* derick -- texmapping near malloc mcopy - for(int i=0; i<arrayVars.size(); i++) - { - //printf("var name %s, tex_mem used %s\n", arrayVars[i].name.c_str(), (arrayVars[i].tex_mapped)?"true":"false"); - if (arrayVars[i].tex_mapped ) tex_mem_on ++; - //if (arrayVars[i].cons_mapped ) cons_mem_on ++; - } - */ - - //Add our mallocs (and input array memcpys) - for (int i = 0; i < arrayVars.size(); i++) { - if(arrayVars[i].cons_mapped) { - setupConstantVar(constant_mem, &arrayVars[i], globals, i, symtab); - SgStatementPtrList *tnl = new SgStatementPtrList; - cudaBindConstantVar(constant_mem, &arrayVars[i], globals, tnl); - setup_code = ocg->StmtListAppend(setup_code, new CG_roseRepr(tnl)); - } - else { - SgVariableDeclaration* defn = buildVariableDeclaration( - SgName(arrayVars[i].name.c_str()), - buildPointerType(arrayVars[i].type)); - SgInitializedNamePtrList& variables = defn->get_variables(); - SgInitializedNamePtrList::const_iterator j = variables.begin(); - SgInitializedName* initializedName = *j; - SgVariableSymbol* dvs = new SgVariableSymbol(initializedName); - prependStatement(defn, func_body); - - dvs->set_parent(body_symtab); - body_symtab->insert(SgName(arrayVars[i].name.c_str()), dvs); - -// SgVariableSymbol* dvs = body_symtab->find_variable(SgName(arrayVars[i].name.c_str())); - - // if(dvs == NULL) - // dvs = parameter_symtab->find_variable(SgName(arrayVars[i].name.c_str())); - - //cudaMalloc args - // SgBasicBlock* block = buildBasicBlock(); - SgName name_cuda_malloc("cudaMalloc"); - SgFunctionDeclaration * decl_cuda_malloc = - buildNondefiningFunctionDeclaration(name_cuda_malloc, - buildVoidType(), buildFunctionParameterList(), globals); - - SgName name_cuda_copy("cudaMemcpy"); - SgFunctionDeclaration * decl_cuda_copy = - buildNondefiningFunctionDeclaration(name_cuda_copy, - buildVoidType(), buildFunctionParameterList(), globals); - - SgExprListExp* args = buildExprListExp(); - args->append_expression( - buildCastExp(buildAddressOfOp(buildVarRefExp(dvs)), - buildPointerType(buildPointerType(buildVoidType())))); - args->append_expression(arrayVars[i].size_expr); - -// decl_cuda_malloc->get_parameterList()->append_arg - SgFunctionCallExp *the_call = buildFunctionCallExp( - buildFunctionRefExp(decl_cuda_malloc), args); - - SgExprStatement* stmt = buildExprStatement(the_call); - - // (*replacement_list).push_back (stmt); - - SgStatementPtrList* tnl = new SgStatementPtrList; - (*tnl).push_back(stmt); - setup_code = ocg->StmtListAppend(setup_code, new CG_roseRepr(tnl)); - if (arrayVars[i].in_data) { - - SgExprListExp * cuda_copy_in_args = buildExprListExp(); - cuda_copy_in_args->append_expression( - isSgExpression(buildVarRefExp(dvs))); - cuda_copy_in_args->append_expression( - isSgExpression(buildVarRefExp(arrayVars[i].in_data))); - CG_roseRepr* size_exp = new CG_roseRepr(arrayVars[i].size_expr); - cuda_copy_in_args->append_expression( - static_cast<CG_roseRepr*>(size_exp->clone())->GetExpression()); - cuda_copy_in_args->append_expression( - buildOpaqueVarRefExp("cudaMemcpyHostToDevice", globals)); - -// cuda_copy_in_args->append_expression( -// new SgVarRefExp(sourceLocation, ) -// ); - SgFunctionCallExp * cuda_copy_in_func_call = buildFunctionCallExp( - buildFunctionRefExp(decl_cuda_copy), cuda_copy_in_args); - - SgExprStatement* stmt = buildExprStatement(cuda_copy_in_func_call); - - SgStatementPtrList *tnl = new SgStatementPtrList; - (*tnl).push_back(stmt); - setup_code = ocg->StmtListAppend(setup_code, new CG_roseRepr(tnl)); - - if(arrayVars[i].tex_mapped) { - setupTexmappingVar(texture, &arrayVars[i], globals, i, dvs, symtab); - SgStatementPtrList *tnl = new SgStatementPtrList; - cudaBindTexture(texture, &arrayVars[i], globals, tnl); - setup_code = ocg->StmtListAppend(setup_code, new CG_roseRepr(tnl)); - } - } - } - } - - //Build dimGrid dim3 variables based on loop dimentions and ti/tj - char blockD1[120]; - char blockD2[120]; - if (dim1) { - snprintf(blockD1, 120, "%s/%d", - dim1->get_declaration()->get_name().getString().c_str(), cu_tx); - snprintf(blockD2, 120, "%s/%d", - dim2->get_declaration()->get_name().getString().c_str(), cu_ty); - } else { - snprintf(blockD1, 120, "%d", cu_bx); - snprintf(blockD2, 120, "%d", cu_by); - //snprintf(blockD1, 120, "%d/%d", cu_nx, cu_tx); - //snprintf(blockD2, 120, "%d/%d", cu_ny, cu_ty); - } - - SgInitializedName* arg1 = buildInitializedName("i", buildIntType()); - SgInitializedName* arg2 = buildInitializedName("j", buildIntType()); - SgInitializedName* arg3 = buildInitializedName("k", buildIntType()); - SgName type_name("dim3"); - //SgClassSymbol * type_symbol = globalScope->lookup_class_symbol(type_name); - - //ROSE_ASSERT(type_symbol != NULL); - - //SgClassDeclaration * dim3classdecl = isSgClassDeclaration( - // type_symbol->get_declaration()); - - SgFunctionDeclaration * funcdecl = buildNondefiningFunctionDeclaration( - SgName("dim3"), buildOpaqueType("dim3", globalScope), - //isSgType(dim3classdecl->get_type()), - buildFunctionParameterList(arg1, arg2, arg3), globalScope); - - if (cu_bx && cu_by) - repr = ocg->CreateDim3((const char*) gridName, ocg->CreateInt(cu_bx), - ocg->CreateInt(cu_by)); - else if (cu_bx_repr && cu_by_repr) - repr = ocg->CreateDim3((const char*) gridName, cu_bx_repr, cu_by_repr); - else if (cu_bx_repr) - repr = ocg->CreateDim3((const char*) gridName, cu_bx_repr, - ocg->CreateInt(1)); - setup_code = ocg->StmtListAppend(setup_code, repr); - //SgStatementPtrList* dimList = static_cast<CG_roseRepr *>(repr)->GetList(); - - //for(SgStatementPtrList::iterator it = (*dimList).begin(); it != (*dimList).end(); it++) - // (*replacement_list).push_back (*it); - - // repr = ocg->CreateDim3((const char*)blockName, cu_tx,cu_ty); - - if (cu_tz > 1 || cu_tz_repr) { - - if (cu_tx && cu_ty && cu_tz) - repr = ocg->CreateDim3((char*) blockName, ocg->CreateInt(cu_tx), - ocg->CreateInt(cu_ty), ocg->CreateInt(cu_tz)); - else if (cu_tx_repr && cu_ty_repr && cu_tz_repr) - repr = ocg->CreateDim3((char*) blockName, cu_tx_repr, cu_ty_repr, - cu_tz_repr); - // SgStatementPtrList* dimList = static_cast<CG_roseRepr *>(repr)->GetList(); - - // for(SgStatementPtrList::iterator it = (*dimList).begin(); it != (*dimList).end(); it++) - // (*replacement_list).push_back (*it); - - } else { - if (cu_tx && cu_ty) - repr = ocg->CreateDim3((char*) blockName, ocg->CreateInt(cu_tx), - ocg->CreateInt(cu_ty)); - else if (cu_tx_repr && cu_ty_repr) - repr = ocg->CreateDim3((char*) blockName, cu_tx_repr, cu_ty_repr); - //SgStatementPtrList* dimList = static_cast<CG_roseRepr *>(repr)->GetList(); - - //for(SgStatementPtrList::iterator it = (*dimList).begin(); it != (*dimList).end(); it++) - // (*replacement_list).push_back (*it); - - } - - setup_code = ocg->StmtListAppend(setup_code, repr); - - SgCudaKernelExecConfig* config = new SgCudaKernelExecConfig( - buildVarRefExp(gridName), buildVarRefExp(blockName), NULL, NULL); - //SgCudaKernelExecConfig* config = new SgCudaKernelExecConfig(buildIntVal(cu_bx), , NULL, NULL); - SgExprListExp* iml = new SgExprListExp(); - SgCastExp* dim_s; - - //Creating Kernel function - SgBasicBlock* bb = new SgBasicBlock(TRANSFORMATION_FILE_INFO); - SgFunctionDefinition* kernel_defn = new SgFunctionDefinition( - TRANSFORMATION_FILE_INFO, bb); - SgFunctionDeclaration* kernel_decl_ = new SgFunctionDeclaration( - TRANSFORMATION_FILE_INFO, SgName((char*)cu_kernel_name.c_str()),buildFunctionType(buildVoidType(), buildFunctionParameterList()), kernel_defn); - SgFunctionDeclaration* kernel_decl = new SgFunctionDeclaration( - TRANSFORMATION_FILE_INFO, SgName((char*)cu_kernel_name.c_str()),buildFunctionType(buildVoidType(), buildFunctionParameterList()), kernel_defn); - - //((kernel_decl->get_declarationModifier()).get_storageModifier()).setStatic(); - - kernel_decl->set_definingDeclaration(kernel_decl); - kernel_defn->set_parent(kernel_decl); - bb->set_parent(kernel_defn); - bb->set_endOfConstruct(TRANSFORMATION_FILE_INFO); - bb->get_endOfConstruct()->set_parent(bb); - - //SgFunctionSymbol* functionSymbol = new SgFunctionSymbol(kernel_decl_); - //globals->insert_symbol(SgName((char*) cu_kernel_name.c_str()), - // functionSymbol); - SgFunctionSymbol* functionSymbol2 = new SgFunctionSymbol(kernel_decl); - - globals->insert_symbol(SgName((char*) cu_kernel_name.c_str()), - functionSymbol2); - - kernel_decl_->set_parent(globals); - - kernel_decl_->set_scope(globals); - - kernel_decl_->setForward(); - - globals->prepend_declaration(kernel_decl_); - - kernel_decl->set_endOfConstruct(TRANSFORMATION_FILE_INFO); - kernel_decl->get_endOfConstruct()->set_parent(kernel_decl); - - kernel_decl->set_parent(globals); - kernel_decl->set_scope(globals); - - kernel_decl->get_definition()->set_endOfConstruct(TRANSFORMATION_FILE_INFO); - kernel_decl->get_definition()->get_endOfConstruct()->set_parent( - kernel_decl->get_definition()); - - globals->append_statement(kernel_decl); - - //printf("%s %s\n", static_cast<const char*>(cu_kernel_name), dims); - //--derick - kernel function parameters - for (int i = 0; i < arrayVars.size(); i++) - //Throw in a type cast if our kernel takes 2D array notation - //like (float(*) [1024]) - { - //protonu--throwing in another hack to stop the caller from passing tex mapped - //vars to the kernel. - if (arrayVars[i].tex_mapped == true || arrayVars[i].cons_mapped) - continue; - if (!(arrayVars[i].size_multi_dim.empty())) { - //snprintf(dims,120,"(float(*) [%d])%s", arrayVars[i].size_2d, - // const_cast<char*>(arrayVars[i].name.c_str())); - - SgType* t = arrayVars[i].type; - for (int k = arrayVars[i].size_multi_dim.size() - 1; k >= 0; k--) { - t = buildArrayType(t, - buildIntVal(arrayVars[i].size_multi_dim[k])); - } - SgVariableSymbol* temp = body_symtab->find_variable( - SgName((char*) arrayVars[i].name.c_str())); - if (temp == NULL) - temp = parameter_symtab->find_variable( - SgName((char*) arrayVars[i].name.c_str())); - - dim_s = buildCastExp(buildVarRefExp(temp), buildPointerType(t), - SgCastExp::e_C_style_cast); - - //printf("%d %s\n", i, dims); - iml->append_expression(dim_s); - - SgInitializedName* id = buildInitializedName( - (char*) arrayVars[i].original_name.c_str(), - buildPointerType(t)); - kernel_decl->get_parameterList()->append_arg(id); - kernel_decl_->get_parameterList()->append_arg(id); - id->set_file_info(TRANSFORMATION_FILE_INFO); - - // DQ (9/8/2007): We now test this, so it has to be set explicitly. - id->set_scope(kernel_decl->get_definition()); - - // DQ (9/8/2007): Need to add variable symbol to global scope! - //printf ("Fixing up the symbol table in scope = %p = %s for SgInitializedName = %p = %s \n",globalScope,globalScope->class_name().c_str(),var1_init_name,var1_init_name->get_name().str()); - SgVariableSymbol *var_symbol = new SgVariableSymbol(id); - kernel_decl->get_definition()->insert_symbol(id->get_name(), - var_symbol); - - // if(kernel_decl->get_definition()->get_symbol_table()->find((const) id) == NULL) - - } else { - //printf("%d %s\n", i, static_cast<const char*>(arrayVars[i].name)); - SgVariableSymbol* temp = body_symtab->find_variable( - SgName((char*) arrayVars[i].name.c_str())); - if (temp == NULL) - temp = parameter_symtab->find_variable( - SgName((char*) arrayVars[i].name.c_str())); - iml->append_expression(buildVarRefExp(temp)); - SgInitializedName* id = buildInitializedName( - (char*) arrayVars[i].original_name.c_str(), - buildPointerType(arrayVars[i].type)); - kernel_decl->get_parameterList()->append_arg(id); - kernel_decl_->get_parameterList()->append_arg(id); - id->set_file_info(TRANSFORMATION_FILE_INFO); - - // DQ (9/8/2007): We now test this, so it has to be set explicitly. - id->set_scope(kernel_decl->get_definition()); - - // DQ (9/8/2007): Need to add variable symbol to global scope! - //printf ("Fixing up the symbol table in scope = %p = %s for SgInitializedName = %p = %s \n"$ - SgVariableSymbol *var_symbol = new SgVariableSymbol(id); - kernel_decl->get_definition()->insert_symbol(id->get_name(), - var_symbol); - - } - - } - if (dim1) { - iml->append_expression(buildVarRefExp(dim1)); - SgInitializedName* id = buildInitializedName( - dim1->get_name().getString().c_str(), dim1->get_type()); - kernel_decl->get_parameterList()->append_arg(id); - - iml->append_expression(buildVarRefExp(dim2)); - SgInitializedName* id2 = buildInitializedName( - dim2->get_name().getString().c_str(), dim2->get_type()); - - kernel_decl->get_parameterList()->append_arg(id); - kernel_decl_->get_parameterList()->append_arg(id); - } - - kernel_decl->get_functionModifier().setCudaKernel(); - kernel_decl_->get_functionModifier().setCudaKernel(); - SgCudaKernelCallExp * cuda_call_site = new SgCudaKernelCallExp( - TRANSFORMATION_FILE_INFO, buildFunctionRefExp(kernel_decl), iml,config); - - // SgStatementPtrList *tnl2 = new SgStatementPtrList; - - (*replacement_list).push_back(buildExprStatement(cuda_call_site)); - - setup_code = ocg->StmtListAppend(setup_code, - new CG_roseRepr(replacement_list)); - - //cuda free variables - for (int i = 0; i < arrayVars.size(); i++) { - if (arrayVars[i].out_data) { - - SgName name_cuda_copy("cudaMemcpy"); - SgFunctionDeclaration * decl_cuda_copyout = - buildNondefiningFunctionDeclaration(name_cuda_copy, - buildVoidType(), buildFunctionParameterList(), - globals); - - SgExprListExp* args = buildExprListExp(); - SgExprListExp * cuda_copy_out_args = buildExprListExp(); - cuda_copy_out_args->append_expression( - isSgExpression(buildVarRefExp(arrayVars[i].out_data))); - cuda_copy_out_args->append_expression( - isSgExpression(buildVarRefExp(arrayVars[i].name))); - CG_roseRepr* size_exp = new CG_roseRepr(arrayVars[i].size_expr); - cuda_copy_out_args->append_expression( - static_cast<CG_roseRepr*>(size_exp->clone())->GetExpression()); - cuda_copy_out_args->append_expression( - buildOpaqueVarRefExp("cudaMemcpyDeviceToHost", globals)); - -// cuda_copy_in_args->append_expression( -// new SgVarRefExp(sourceLocation, ) -// ); - SgFunctionCallExp * cuda_copy_out_func_call = buildFunctionCallExp( - buildFunctionRefExp(decl_cuda_copyout), cuda_copy_out_args); - - SgFunctionCallExp *the_call = buildFunctionCallExp( - buildFunctionRefExp(decl_cuda_copyout), cuda_copy_out_args); - - SgExprStatement* stmt = buildExprStatement(the_call); - - SgStatementPtrList* tnl3 = new SgStatementPtrList; - - (*tnl3).push_back(stmt); - - // tree_node_list* tnl = new tree_node_list; - // tnl->append(new tree_instr(the_call)); - setup_code = ocg->StmtListAppend(setup_code, new CG_roseRepr(tnl3)); - - } - if(!arrayVars[i].cons_mapped) { - SgName name_cuda_free("cudaFree"); - SgFunctionDeclaration * decl_cuda_free = - buildNondefiningFunctionDeclaration(name_cuda_free, - buildVoidType(), buildFunctionParameterList(), globals); - - SgExprListExp* args3 = buildExprListExp(); - - SgVariableSymbol* tmp = body_symtab->find_variable( - SgName(arrayVars[i].name.c_str())); - if (tmp == NULL) - tmp = parameter_symtab->find_variable( - SgName(arrayVars[i].name.c_str())); - - args3->append_expression(buildVarRefExp(tmp)); - - SgFunctionCallExp *the_call2 = buildFunctionCallExp( - buildFunctionRefExp(decl_cuda_free), args3); - - SgExprStatement* stmt2 = buildExprStatement(the_call2); - - SgStatementPtrList* tnl4 = new SgStatementPtrList; - - (*tnl4).push_back(stmt2); - //(*replacement_list).push_back (stmt2); - - setup_code = ocg->StmtListAppend(setup_code, new CG_roseRepr(tnl4)); - } - } - - // --------------- - // BUILD THE KERNEL - // --------------- - - //Extract out kernel body - SgNode* code = getCode(); - //Create kernel function body - //Add Params - std::map<std::string, SgVariableSymbol*> loop_vars; - //In-Out arrays - for (int i = 0; i < arrayVars.size(); i++) { - /* if(arrayVars[i].in_data) - fptr = arrayVars[i].in_data->type()->clone(); - else - fptr = arrayVars[i].out_data->type()->clone(); - */ - - // fptr = new_proc_syms->install_type(fptr); - std::string name = - arrayVars[i].in_data ? - arrayVars[i].in_data->get_declaration()->get_name().getString() : - arrayVars[i].out_data->get_declaration()->get_name().getString(); - //SgVariableSymbol* sym = new var_sym(fptr, arrayVars[i].in_data ? arrayVars[i].in_data->name() : arrayVars[i].out_data->name()); - - SgVariableSymbol* sym = - kernel_decl->get_definition()->get_symbol_table()->find_variable( - (const char*) name.c_str()); - /* SgVariableDeclaration* defn = buildVariableDeclaration(SgName(name.c_str()), buildFloatType()); - SgInitializedNamePtrList& variables = defn->get_variables(); - SgInitializedNamePtrList::const_iterator i = variables.begin(); - SgInitializedName* initializedName = *i; - SgVariableSymbol* sym = new SgVariableSymbol(initializedName); - prependStatement(defn, isSgScopeStatement(root_)); - - vs->set_parent(symtab2_); - symtab2_->insert(SgName(_s.c_str()), vs); - */ - - if (sym != NULL) - loop_vars.insert( - std::pair<std::string, SgVariableSymbol*>(std::string(name), - sym)); - } - - //Figure out which loop variables will be our thread and block dimention variables - std::vector<SgVariableSymbol *> loop_syms; - //Get our indexes - std::vector<const char*> indexes; // = get_loop_indexes(code,cu_num_reduce); - int threadsPos = 0; - - CG_outputRepr *body = NULL; - SgFunctionDefinition* func_d = func_definition; - //std::vector<SgVariableSymbol *> symbols = recursiveFindRefs(code); - - SgName name_sync("__syncthreads"); - SgFunctionDeclaration * decl_sync = buildNondefiningFunctionDeclaration( - name_sync, buildVoidType(), buildFunctionParameterList(), - globalScope); - - recursiveFindRefs(code, syms, func_d); - - //SgFunctionDeclaration* func = Outliner::generateFunction (code, (char*)cu_kernel_name.c_str(), syms, pdSyms, psyms, NULL, globalScope); - - if (cu_bx > 1 || cu_bx_repr) { - indexes.push_back("bx"); - SgName type_name("blockIdx.x"); - SgClassSymbol * type_symbol = globalScope->lookup_class_symbol( - type_name); - SgVariableDeclaration * var_decl = buildVariableDeclaration("bx", - buildIntType(), NULL, - isSgScopeStatement(kernel_decl->get_definition()->get_body())); - SgStatementPtrList *tnl = new SgStatementPtrList; - // (*tnl).push_back(isSgStatement(var_decl)); - appendStatement(var_decl, kernel_decl->get_definition()->get_body()); - - SgVariableSymbol* bx = - kernel_decl->get_definition()->get_body()->lookup_variable_symbol( - SgName("bx")); - SgStatement* assign = isSgStatement( - buildAssignStatement(buildVarRefExp(bx), - buildOpaqueVarRefExp("blockIdx.x", - kernel_decl->get_definition()->get_body()))); - (*tnl).push_back(assign); - // body = ocg->StmtListAppend(body, - // new CG_roseRepr(tnl)); - appendStatement(assign, kernel_decl->get_definition()->get_body()); - - } - if (cu_by > 1 || cu_by_repr) { - indexes.push_back("by"); - SgName type_name("blockIdx.y"); - SgClassSymbol * type_symbol = globalScope->lookup_class_symbol( - type_name); - SgVariableDeclaration * var_decl = buildVariableDeclaration("by", - buildIntType(), NULL, - isSgScopeStatement(kernel_decl->get_definition()->get_body())); - // SgStatementPtrList *tnl = new SgStatementPtrList; - // (*tnl).push_back(isSgStatement(var_decl)); - appendStatement(var_decl, kernel_decl->get_definition()->get_body()); - - SgVariableSymbol* by = - kernel_decl->get_definition()->get_body()->lookup_variable_symbol( - SgName("by")); - SgStatement* assign = isSgStatement( - buildAssignStatement(buildVarRefExp(by), - buildOpaqueVarRefExp("blockIdx.y", - kernel_decl->get_definition()->get_body()))); - //(*tnl).push_back(assign); - // body = ocg->StmtListAppend(body, - // new CG_roseRepr(tnl)); - appendStatement(assign, kernel_decl->get_definition()->get_body()); - - } - if (cu_tx_repr || cu_tx > 1) { - threadsPos = indexes.size(); - indexes.push_back("tx"); - SgName type_name("threadIdx.x"); - SgClassSymbol * type_symbol = globalScope->lookup_class_symbol( - type_name); - SgVariableDeclaration * var_decl = buildVariableDeclaration("tx", - buildIntType(), NULL, - isSgScopeStatement(kernel_decl->get_definition()->get_body())); - // SgStatementPtrList *tnl = new SgStatementPtrList; - // (*tnl).push_back(isSgStatement(var_decl)); - appendStatement(var_decl, kernel_decl->get_definition()->get_body()); - - SgVariableSymbol* tx = - kernel_decl->get_definition()->get_body()->lookup_variable_symbol( - SgName("tx")); - SgStatement* assign = isSgStatement( - buildAssignStatement(buildVarRefExp(tx), - buildOpaqueVarRefExp("threadIdx.x", - kernel_decl->get_definition()->get_body()))); - //(*tnl).push_back(assign); - // body = ocg->StmtListAppend(body, - // new CG_roseRepr(tnl)); - appendStatement(assign, kernel_decl->get_definition()->get_body()); - - } - if (cu_ty_repr || cu_ty > 1) { - indexes.push_back("ty"); - SgName type_name("threadIdx.y"); - SgClassSymbol * type_symbol = globalScope->lookup_class_symbol( - type_name); - SgVariableDeclaration * var_decl = buildVariableDeclaration("ty", - buildIntType(), NULL, - isSgScopeStatement(kernel_decl->get_definition()->get_body())); - appendStatement(var_decl, kernel_decl->get_definition()->get_body()); - - // SgStatementPtrList *tnl = new SgStatementPtrList; - // (*tnl).push_back(isSgStatement(var_decl)); - SgVariableSymbol* ty = - kernel_decl->get_definition()->get_body()->lookup_variable_symbol( - SgName("ty")); - SgStatement* assign = isSgStatement( - buildAssignStatement(buildVarRefExp(ty), - buildOpaqueVarRefExp("threadIdx.y", - kernel_decl->get_definition()->get_body()))); - // (*tnl).push_back(assign); - // body = ocg->StmtListAppend(body, - // new CG_roseRepr(tnl)); - appendStatement(assign, kernel_decl->get_definition()->get_body()); - - } - if (cu_tz_repr || cu_tz > 1) { - indexes.push_back("tz"); - SgName type_name("threadIdx.z"); - SgClassSymbol * type_symbol = globalScope->lookup_class_symbol( - type_name); - SgVariableDeclaration * var_decl = buildVariableDeclaration("tz", - buildIntType(), NULL, - isSgScopeStatement(kernel_decl->get_definition()->get_body())); - // SgStatementPtrList *tnl = new SgStatementPtrList; - // (*tnl).push_back(isSgStatement(var_decl)); - appendStatement(var_decl, kernel_decl->get_definition()->get_body()); - - SgVariableSymbol* tz = - kernel_decl->get_definition()->get_body()->lookup_variable_symbol( - "tz"); - SgStatement* assign = isSgStatement( - buildAssignStatement(buildVarRefExp(tz), - buildOpaqueVarRefExp("threadIdx.z", - kernel_decl->get_definition()->get_body()))); - // (*tnl).push_back(assign); - // body = ocg->StmtListAppend(body, - // new CG_roseRepr(tnl)); - appendStatement(assign, kernel_decl->get_definition()->get_body()); - - } - - std::map<std::string, SgVariableSymbol*> loop_idxs; //map from idx names to their new syms - - SgNode* swapped_ = swapVarReferences(code, syms, - kernel_decl->get_definition()->get_symbol_table(), - kernel_decl->get_definition()->get_body()->get_symbol_table(), - kernel_decl->get_definition()->get_body()); - - //std::cout << swapped_->unparseToString() << std::endl << std::endl; - - SgNode *swapped = recursiveFindReplacePreferedIdxs(swapped_, - kernel_decl->get_definition()->get_body()->get_symbol_table(), - kernel_decl->get_definition()->get_symbol_table(), - kernel_decl->get_definition()->get_body(), loop_idxs, globalScope); //in-place swapping - //swapped->print(); - - if (!isSgBasicBlock(swapped)) { - appendStatement(isSgStatement(swapped), - kernel_decl->get_definition()->get_body()); - swapped->set_parent( - isSgNode(kernel_decl->get_definition()->get_body())); - } else { - - for (SgStatementPtrList::iterator it = - isSgBasicBlock(swapped)->get_statements().begin(); - it != isSgBasicBlock(swapped)->get_statements().end(); it++) { - appendStatement(*it, kernel_decl->get_definition()->get_body()); - (*it)->set_parent( - isSgNode(kernel_decl->get_definition()->get_body())); - - } - - } - - for (int i = 0; i < indexes.size(); i++) { - std::vector<SgForStatement*> tfs = findCommentedFors(indexes[i], - swapped); - for (int k = 0; k < tfs.size(); k++) { - //printf("replacing %p tfs for index %s\n", tfs[k], indexes[i]); - SgNode* newBlock = forReduce(tfs[k], loop_idxs[indexes[i]], - kernel_decl->get_definition()); - //newBlock->print(); - swap_node_for_node_list(tfs[k], newBlock); - //printf("AFTER SWAP\n"); newBlock->print(); - } - } - - //--derick replace array refs of texture mapped vars here - body = new CG_roseRepr(kernel_decl->get_definition()->get_body()); - std::vector<IR_ArrayRef*> refs = ir->FindArrayRef(body); - texmapArrayRefs(texture, &refs, globals, ir, ocg); - // do the same for constant mapped vars - consmapArrayRefs(constant_mem, &refs, globals, ir, ocg); - - return swapped; -} - -//Order taking out dummy variables -std::vector<std::string> cleanOrder(std::vector<std::string> idxNames) { - std::vector<std::string> results; - for (int j = 0; j < idxNames.size(); j++) { - if (idxNames[j].length() != 0) - results.push_back(idxNames[j]); - } - return results; -} - -//First non-dummy level in ascending order -int LoopCuda::nonDummyLevel(int stmt, int level) { - //level comes in 1-basd and should leave 1-based - for (int j = level - 1; j < idxNames[stmt].size(); j++) { - if (idxNames[stmt][j].length() != 0) { - //printf("found non dummy level of %d with idx: %s when searching for %d\n", j+1, (const char*) idxNames[stmt][j], level); - return j + 1; - } - } - char buf[128]; - sprintf(buf, "%d", level); - throw std::runtime_error( - std::string("Unable to find a non-dummy level starting from ") - + std::string(buf)); -} - -int LoopCuda::findCurLevel(int stmt, std::string idx) { - for (int j = 0; j < idxNames[stmt].size(); j++) { - if (strcmp(idxNames[stmt][j].c_str(), idx.c_str()) == 0) - return j + 1; - } - throw std::runtime_error( - std::string("Unable to find index ") + idx - + std::string(" in current list of indexes")); -} - -void LoopCuda::permute_cuda(int stmt, - const std::vector<std::string>& curOrder) { - //printf("curOrder: "); - //printVs(curOrder); - //printf("idxNames: "); - //printVS(idxNames[stmt]); - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt]); - bool same = true; - std::vector<int> pi; - for (int i = 0; i < curOrder.size(); i++) { - bool found = false; - for (int j = 0; j < cIdxNames.size(); j++) { - if (strcmp(cIdxNames[j].c_str(), curOrder[i].c_str()) == 0) { - pi.push_back(j + 1); - found = true; - if (j != i) - same = false; - } - } - if (!found) { - throw std::runtime_error( - "One of the indexes in the permute order were not " - "found in the current set of indexes."); - } - } - for (int i = curOrder.size(); i < cIdxNames.size(); i++) { - pi.push_back(i); - } - if (same) - return; - permute(stmt, pi); - //Set old indexe names as new - for (int i = 0; i < curOrder.size(); i++) { - idxNames[stmt][i] = curOrder[i].c_str(); //what about sibling stmts? - } -} - -bool LoopCuda::permute(int stmt_num, const std::vector<int> &pi) { -// check for sanity of parameters - if (stmt_num >= stmt.size() || stmt_num < 0) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - const int n = stmt[stmt_num].xform.n_out(); - if (pi.size() > (n - 1) / 2) - throw std::invalid_argument( - "iteration space dimensionality does not match permute dimensionality"); - int first_level = 0; - int last_level = 0; - for (int i = 0; i < pi.size(); i++) { - if (pi[i] > (n - 1) / 2 || pi[i] <= 0) - throw std::invalid_argument( - "invalid loop level " + to_string(pi[i]) - + " in permuation"); - - if (pi[i] != i + 1) { - if (first_level == 0) - first_level = i + 1; - last_level = i + 1; - } - } - if (first_level == 0) - return true; - - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> active = getStatements(lex, 2 * first_level - 2); - Loop::permute(active, pi); -} - -void LoopCuda::tile_cuda(int stmt, int level, int outer_level) { - tile_cuda(stmt, level, 1, outer_level, "", "", CountedTile); -} -void LoopCuda::tile_cuda(int level, int tile_size, int outer_level, - std::string idxName, std::string ctrlName, TilingMethodType method) { - tile_cuda(0, level, tile_size, outer_level, idxName, ctrlName, method); -} - -void LoopCuda::tile_cuda(int stmt, int level, int tile_size, int outer_level, - std::string idxName, std::string ctrlName, TilingMethodType method) { - //Do regular tile but then update the index and control loop variable - //names as well as the idxName to reflect the current state of things. - //printf("tile(%d,%d,%d,%d)\n", stmt, level, tile_size, outer_level); - //printf("idxNames before: "); - //printVS(idxNames[stmt]); - - tile(stmt, level, tile_size, outer_level, method); - - if (idxName.size()) - idxNames[stmt][level - 1] = idxName.c_str(); - if (tile_size == 1) { - //potentially rearrange loops - if (outer_level < level) { - std::string tmp = idxNames[stmt][level - 1]; - for (int i = level - 1; i > outer_level - 1; i--) { - if (i - 1 >= 0) - idxNames[stmt][i] = idxNames[stmt][i - 1]; - } - idxNames[stmt][outer_level - 1] = tmp; - } - //TODO: even with a tile size of one, you need a insert (of a dummy loop) - idxNames[stmt].insert(idxNames[stmt].begin() + (level), ""); - } else { - if (!ctrlName.size()) - throw std::runtime_error("No ctrl loop name for tile"); - //insert - idxNames[stmt].insert(idxNames[stmt].begin() + (outer_level - 1), - ctrlName.c_str()); - } - - //printf("idxNames after: "); - //printVS(idxNames[stmt]); -} - -bool LoopCuda::datacopy_privatized_cuda(int stmt_num, int level, - const std::string &array_name, - const std::vector<int> &privatized_levels, bool allow_extra_read, - int fastest_changing_dimension, int padding_stride, - int padding_alignment, bool cuda_shared) { - int old_stmts = stmt.size(); - // printf("before datacopy_privatized:\n"); - printIS(); - //datacopy_privatized(stmt_num, level, array_name, privatized_levels, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, cuda_shared); - if (cuda_shared) - datacopy_privatized(stmt_num, level, array_name, privatized_levels, - allow_extra_read, fastest_changing_dimension, padding_stride, - padding_alignment, 1); - else - datacopy_privatized(stmt_num, level, array_name, privatized_levels, - allow_extra_read, fastest_changing_dimension, padding_stride, - padding_alignment, 0); - // printf("after datacopy_privatized:\n"); - printIS(); - - //Adjust idxNames to reflect updated state - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt_num]); - int new_stmts = stmt.size(); - for (int i = old_stmts; i < new_stmts; i++) { - //printf("fixing up statement %d\n", i); - std::vector<std::string> idxs; - - //protonu-making sure the vector of nonSplitLevels grows along with - //the statement structure - stmt_nonSplitLevels.push_back(std::vector<int>()); - - //Indexes up to level will be the same - for (int j = 0; j < level - 1; j++) - idxs.push_back(cIdxNames[j]); - - //Expect privatized_levels to match - for (int j = 0; j < privatized_levels.size(); j++) - idxs.push_back(cIdxNames[privatized_levels[j] - 1]);//level is one-based - - //all further levels should match order they are in originally - if (privatized_levels.size()) { - int last_privatized = privatized_levels.back(); - int top_level = last_privatized - + (stmt[i].IS.n_set() - idxs.size()); - //printf("last privatized_levels: %d top_level: %d\n", last_privatized, top_level); - for (int j = last_privatized; j < top_level; j++) { - idxs.push_back(cIdxNames[j]); - //printf("pushing back: %s\n", (const char*)cIdxNames[j]); - } - } - idxNames.push_back(idxs); - } -} - -bool LoopCuda::datacopy_cuda(int stmt_num, int level, - const std::string &array_name, - const std::vector<std::string> new_idxs, - bool allow_extra_read, int fastest_changing_dimension, - int padding_stride, int padding_alignment, bool cuda_shared) { - - int old_stmts = stmt.size(); - //datacopy(stmt_num,level,array_name,allow_extra_read,fastest_changing_dimension,padding_stride,padding_alignment,cuda_shared); - // printf("before datacopy:\n"); - // printIS(); - if (cuda_shared) - datacopy(stmt_num, level, array_name, allow_extra_read, - fastest_changing_dimension, padding_stride, padding_alignment, - 1); - else - datacopy(stmt_num, level, array_name, allow_extra_read, - fastest_changing_dimension, padding_stride, padding_alignment, - 0); - // printf("after datacopy:\n"); - printIS(); - - //Adjust idxNames to reflect updated state - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt_num]); - int new_stmts = stmt.size(); - for (int i = old_stmts; i < new_stmts; i++) { - //printf("fixing up statement %d\n", i); - std::vector<std::string> idxs; - - //protonu-making sure the vector of nonSplitLevels grows along with - //the statement structure - stmt_nonSplitLevels.push_back(std::vector<int>()); - - //Indexes up to level will be the same - for (int j = 0; j < level - 1; j++) - idxs.push_back(cIdxNames[j]); - - //all further levels should get names from new_idxs - int top_level = stmt[i].IS.n_set(); - //printf("top_level: %d level: %d\n", top_level, level); - if (new_idxs.size() < top_level - level + 1) - throw std::runtime_error( - "Need more new index names for new datacopy loop levels"); - - for (int j = level - 1; j < top_level; j++) { - idxs.push_back(new_idxs[j - level + 1].c_str()); - //printf("pushing back: %s\n", new_idxs[j-level+1].c_str()); - } - idxNames.push_back(idxs); - } -} - -bool LoopCuda::unroll_cuda(int stmt_num, int level, int unroll_amount) { - int old_stmts = stmt.size(); - //bool b= unroll(stmt_num, , unroll_amount); - - int dim = 2 * level - 1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim - 1); - - level = nonDummyLevel(stmt_num, level); - //printf("unrolling %d at level %d\n", stmt_num,level); - - //protonu--using the new version of unroll, which returns - //a set of ints instead of a bool. To keep Gabe's logic - //I'll check the size of the set, if it's 0 return true - //bool b= unroll(stmt_num, level, unroll_amount); - std::set<int> b_set = unroll(stmt_num, level, unroll_amount, idxNames); - bool b = false; - if (b_set.size() == 0) - b = true; - //end--protonu - - //Adjust idxNames to reflect updated state - std::vector<std::string> cIdxNames = cleanOrder(idxNames[stmt_num]); - std::vector<std::string> origSource = idxNames[stmt_num]; - ; - //Drop index names at level - if (unroll_amount == 0) { - //For all statements that were in this unroll together, drop index name for unrolled level - idxNames[stmt_num][level - 1] = ""; - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) { - //printf("in same loop as %d is %d\n", stmt_num, (*i)); - //idxNames[(*i)][level-1] = ""; - idxNames[(*i)] = idxNames[stmt_num]; - } - } - - lex = getLexicalOrder(stmt_num); - same_loop = getStatements(lex, dim - 1); - - bool same_as_source = false; - int new_stmts = stmt.size(); - for (int i = old_stmts; i < new_stmts; i++) { - //Check whether we had a sync for the statement we are unrolling, if - //so, propogate that to newly created statements so that if they are - //in a different loop structure, they will also get a syncthreads - int size = syncs.size(); - for (int j = 0; j < size; j++) { - if (syncs[j].first == stmt_num) - syncs.push_back(make_pair(i, syncs[j].second)); - } - - //protonu-making sure the vector of nonSplitLevels grows along with - //the statement structure - stmt_nonSplitLevels.push_back(std::vector<int>()); - - //We expect that new statements have a constant for the variable in - //stmt[i].IS at level (as seen with print_with_subs), otherwise there - //will be a for loop at level and idxNames should match stmt's - //idxNames pre-unrolled - Relation IS = stmt[i].IS; - //Ok, if you know how the hell to get anything out of a Relation, you - //should probably be able to do this more elegantly. But for now, I'm - //hacking it. - std::string s = IS.print_with_subs_to_string(); - //s looks looks like - //{[_t49,8,_t51,_t52,128]: 0 <= _t52 <= 3 && 0 <= _t51 <= 15 && 0 <= _t49 && 64_t49+16_t52+_t51 <= 128} - //where level == 5, you see a integer in the input set - - //If that's not an integer and this is the first new statement, then - //we think codegen will have a loop at that level. It's not perfect, - //not sure if it can be determined without round-tripping to codegen. - int sIdx = 0; - int eIdx = 0; - for (int j = 0; j < level - 1; j++) { - sIdx = s.find(",", sIdx + 1); - if (sIdx < 0) - break; - } - if (sIdx > 0) { - eIdx = s.find("]"); - int tmp = s.find(",", sIdx + 1); - if (tmp > 0 && tmp < eIdx) - eIdx = tmp; //", before ]" - if (eIdx > 0) { - sIdx++; - std::string var = s.substr(sIdx, eIdx - sIdx); - //printf("%s\n", s.c_str()); - //printf("set var for stmt %d at level %d is %s\n", i, level, var.c_str()); - if (atoi(var.c_str()) == 0 && i == old_stmts) { - //TODO:Maybe do see if this new statement would be in the same - //group as the original and if it would, don't say - //same_as_source - if (same_loop.find(i) == same_loop.end()) { - printf( - "stmt %d level %d, newly created unroll statement should have same level indexes as source\n", - i, level); - same_as_source = true; - } - } - } - } - - //printf("fixing up statement %d n_set %d with %d levels\n", i, stmt[i].IS.n_set(), level-1); - if (same_as_source) - idxNames.push_back(origSource); - else - idxNames.push_back(idxNames[stmt_num]); - } - - return b; -} - -void LoopCuda::copy_to_texture(const char *array_name) { - //protonu--placeholder for now - //set the bool for using cuda memory as true - //in a vector of strings, put the names of arrays to tex mapped - if (!texture) - texture = new texture_memory_mapping(true, array_name); - else - texture->add(array_name); - -} - -//void LoopCuda::copy_to_texture_2d(const char *array_name, int width, int height) { -// if (!texture) -// texture = new texture_memory_mapping(true, array_name, width, height); -// else -// texture->add(array_name, width, height); -//} - -void LoopCuda::copy_to_constant(const char *array_name) { - if(!constant_mem) - constant_mem = new constant_memory_mapping(true, array_name); - else - constant_mem->add(array_name); -} - -//protonu--moving this from Loop -SgNode* LoopCuda::codegen() { - if (code_gen_flags & GenCudaizeV2) - return cudaize_codegen_v2(); - //Do other flagged codegen methods, return plain vanilla generated code - return getCode(); -} - -//These three are in Omega code_gen.cc and are used as a massive hack to -//get out some info from MMGenerateCode. Yea for nasty side-effects. -namespace omega { - extern int checkLoopLevel; - extern int stmtForLoopCheck; - extern int upperBoundForLevel; - extern int lowerBoundForLevel; -} - -CG_outputRepr* LoopCuda::extractCudaUB(int stmt_num, int level, - int &outUpperBound, int &outLowerBound) { - // check for sanity of parameters - const int m = stmt.size(); - if (stmt_num >= m || stmt_num < 0) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - const int n = stmt[stmt_num].xform.n_out(); - if (level > (n - 1) / 2 || level <= 0) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - int dim = 2 * level - 1; - - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim - 1); - - // extract the intersection of the iteration space to be considered - Relation hull; - { - hull = Relation::True(n); - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) { - Relation r = getNewIS(*i); - for (int j = dim + 2; j <= r.n_set(); j++) - r = Project(r, r.set_var(j)); - hull = Intersection(hull, r); - hull.simplify(2, 4); - } - - for (int i = 2; i <= dim + 1; i += 2) { - //std::string name = std::string("_t") + to_string(t_counter++); - std::string name = std::string("_t") - + to_string(tmp_loop_var_name_counter++); - hull.name_set_var(i, name); - } - hull.setup_names(); - } - - // extract the exact loop bound of the dimension to be unrolled - if (is_single_iteration(hull, dim)) { - throw std::runtime_error( - "No loop availabe at level to extract upper bound."); - } - Relation bound = get_loop_bound(hull, dim); - if (!bound.has_single_conjunct() || !bound.is_satisfiable() - || bound.is_tautology()) - throw loop_error( - "loop error: unable to extract loop bound for cudaize"); - - // extract the loop stride - EQ_Handle stride_eq; - /*int stride = 1; - { - bool simple_stride = true; - int strides = countStrides(bound.query_DNF()->single_conjunct(), - bound.set_var(dim + 1), stride_eq, simple_stride); - if (strides > 1) - throw loop_error("loop error: too many strides"); - else if (strides == 1) { - int sign = stride_eq.get_coef(bound.set_var(dim + 1)); - // assert(sign == 1 || sign == -1); - Constr_Vars_Iter it(stride_eq, true); - stride = abs((*it).coef / sign); - } - } - */ - int stride = 1; - { - - coef_t stride; - std::pair<EQ_Handle, Variable_ID> result = find_simplest_stride(bound, - bound.set_var(dim + 1)); - if (result.second == NULL) - stride = 1; - else - stride = abs(result.first.get_coef(result.second)) - / gcd(abs(result.first.get_coef(result.second)), - abs(result.first.get_coef(bound.set_var(dim + 1)))); - - if (stride > 1) - throw loop_error("loop error: too many strides"); - /*else if (stride == 1) { - int sign = result.first.get_coef(bound.set_var(dim+1)); - assert(sign == 1 || sign == -1); - } */ - } - - if (stride != 1) { - char buf[1024]; - sprintf(buf, "Cudaize: Loop at level %d has non-one stride of %d", - level, stride); - throw std::runtime_error(buf); - } - - //Use code generation system to build tell us our bound information. We - //need a hard upper bound a 0 lower bound. - - checkLoopLevel = level * 2; - stmtForLoopCheck = stmt_num; - upperBoundForLevel = -1; - lowerBoundForLevel = -1; - printCode(1, false); - checkLoopLevel = 0; - - outUpperBound = upperBoundForLevel; - outLowerBound = lowerBoundForLevel; - - if (outUpperBound == -1) { - - CG_result* temp = last_compute_cgr_; - - while (temp) { - CG_loop * loop; - if (loop = dynamic_cast<CG_loop*>(temp)) { - if (loop->level_ == 2 * level) { - Relation bound = copy(loop->bounds_); - Variable_ID v = bound.set_var(2 * level); - for (GEQ_Iterator e( - const_cast<Relation &>(bound).single_conjunct()->GEQs()); - e; e++) { - if ((*e).get_coef(v) < 0 - && (*e).is_const_except_for_global(v)) - return output_upper_bound_repr(ir->builder(), *e, v, - bound, - std::vector<std::pair<CG_outputRepr *, int> >( - bound.n_set(), - std::make_pair( - static_cast<CG_outputRepr *>(NULL), - 0))); - } - } - if (loop->level_ > 2 * level) - break; - else - temp = loop->body_; - } else - break; - } - } - - return NULL; -} - -void LoopCuda::printCode(int effort, bool actuallyPrint) const { - const int m = stmt.size(); - if (m == 0) - return; - const int n = stmt[0].xform.n_out(); - - /*or (int i = 0; i < m; i++) { - IS[i + 1] = stmt[i].IS; - xform[i + 1] = stmt[i].xform; - - //nonSplitLevels[i+1] = stmt[i].nonSplitLevels; - } - */ - - // invalidate saved codegen computation - if (last_compute_cgr_ != NULL) { - delete last_compute_cgr_; - last_compute_cgr_ = NULL; - } - - if (last_compute_cg_ != NULL) { - delete last_compute_cg_; - last_compute_cg_ = NULL; - } - - //Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - /*CG_stringBuilder *ocg = new CG_stringBuilder(); - Tuple<CG_outputRepr *> nameInfo; - for (int i = 1; i <= m; i++) - nameInfo.append(new CG_stringRepr("s" + to_string(i))); - */ - - // -- replacing MMGenerateCode - // -- formally CG_outputRepr* repr = MMGenerateCode(ocg, xform, IS, nameInfo, known, nonSplitLevels, syncs, idxTupleNames, effort); - // -- in the future, these if statements need to be cleaned up. - // -- something like check_lastComputeCG might be a decent protected member function - // -- and/or something that returns a std::vector<CG_outputRepr*> that also checks last_compute_cg_ - //if (last_compute_cg_ == NULL) { - std::vector<Relation> IS(m); - std::vector<Relation> xforms(m); - std::vector<std::vector<int> > nonSplitLevels(m); - - /* std::vector < std::vector <std::string> > idxTupleNames; - if (useIdxNames) { - for (int i = 0; i < idxNames.size(); i++) { - Tuple<std::string> idxs; - for (int j = 0; j < idxNames[i].size(); j++) - idxs.append(idxNames[i][j]); - idxTupleNames.append(idxs); - } - } - */ - for (int i = 0; i < m; i++) { - IS[i] = stmt[i].IS; - xforms[i] = stmt[i].xform; - nonSplitLevels[i] = stmt_nonSplitLevels[i]; - } - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - - last_compute_cg_ = new CodeGen(xforms, IS, known, nonSplitLevels, idxNames, - syncs); - - delete last_compute_cgr_; // this was just done above? - last_compute_cgr_ = NULL; - //} - - if (last_compute_cgr_ == NULL || last_compute_effort_ != effort) { - delete last_compute_cgr_; - last_compute_cgr_ = last_compute_cg_->buildAST(effort); - last_compute_effort_ = effort; - } - - //std::vector<CG_outputRepr *> stmts(m); - //for (int i = 0; i < m; i++) - // stmts[i] = stmt[i].code; - //CG_outputRepr* repr = last_compute_cgr_->printRepr(ocg, stmts); - // -- end replacing MMGenerateCode - std::string repr = last_compute_cgr_->printString(); - - if (actuallyPrint) - std::cout << repr << std::endl; - //std::cout << static_cast<CG_stringRepr*>(repr)->GetString(); - /* - for (int i = 1; i <= m; i++) - delete nameInfo[i]; - */ - - //delete ocg; -} - -void LoopCuda::printRuntimeInfo() const { - for (int i = 0; i < stmt.size(); i++) { - Relation IS = stmt[i].IS; - Relation xform = stmt[i].xform; - printf("stmt[%d]\n", i); - printf("IS\n"); - IS.print_with_subs(); - - printf("xform[%d]\n", i); - xform.print_with_subs(); - - } -} - -void LoopCuda::printIndexes() const { - for (int i = 0; i < stmt.size(); i++) { - printf("stmt %d nset %d ", i, stmt[i].IS.n_set()); - - for (int j = 0; j < idxNames[i].size(); j++) { - if (j > 0) - printf(","); - printf("%s", idxNames[i][j].c_str()); - } - printf("\n"); - } -} - -SgNode* LoopCuda::getCode(int effort) const { - const int m = stmt.size(); - if (m == 0) - return new SgNode; - const int n = stmt[0].xform.n_out(); - /* - Tuple<CG_outputRepr *> ni(m); - Tuple < Relation > IS(m); - Tuple < Relation > xform(m); - vector < vector <int> > nonSplitLevels(m); - for (int i = 0; i < m; i++) { - ni[i + 1] = stmt[i].code; - IS[i + 1] = stmt[i].IS; - xform[i + 1] = stmt[i].xform; - nonSplitLevels[i + 1] = stmt_nonSplitLevels[i]; - - //nonSplitLevels[i+1] = stmt[i].nonSplitLevels; - } - */ - //Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); -//#ifdef DEBUG -//#endif - //std::cout << GetString(MMGenerateCode(new CG_stringBuilder(), xform, IS, ni, known, - // nonSplitLevels, syncs, idxTupleNames, effort)); - if (last_compute_cgr_ != NULL) { - delete last_compute_cgr_; - last_compute_cgr_ = NULL; - } - - if (last_compute_cg_ != NULL) { - delete last_compute_cg_; - last_compute_cg_ = NULL; - } - - CG_outputBuilder *ocg = ir->builder(); - // -- replacing MMGenerateCode - // -- formally CG_outputRepr* repr = MMGenerateCode(ocg, xform, IS, nameInfo, known, nonSplitLevels, syncs, idxTupleNames, effort); - // -- in the future, these if statements need to be cleaned up. - // -- something like check_lastComputeCG might be a decent protected member function - // -- and/or something that returns a std::vector<CG_outputRepr*> that also checks last_compute_cg_ - //if (last_compute_cg_ == NULL) { - std::vector<Relation> IS(m); - std::vector<Relation> xforms(m); - std::vector<std::vector<int> > nonSplitLevels(m); - for (int i = 0; i < m; i++) { - IS[i] = stmt[i].IS; - xforms[i] = stmt[i].xform; - nonSplitLevels[i] = stmt_nonSplitLevels[i]; - } - - /*std::vector < std::vector<std::string> > idxTupleNames; - if (useIdxNames) { - for (int i = 0; i < idxNames.size(); i++) { - std::vector<std::string> idxs; - for (int j = 0; j < idxNames[i].size(); j++) - idxs.push_back(idxNames[i][j]); - idxTupleNames.push_back(idxs); - } - } - */ - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - - last_compute_cg_ = new CodeGen(xforms, IS, known, nonSplitLevels, idxNames, - syncs); - delete last_compute_cgr_; - last_compute_cgr_ = NULL; - //} - - if (last_compute_cgr_ == NULL || last_compute_effort_ != effort) { - delete last_compute_cgr_; - last_compute_cgr_ = last_compute_cg_->buildAST(effort); - last_compute_effort_ = effort; - } - - std::vector<CG_outputRepr *> stmts(m); - for (int i = 0; i < m; i++) - stmts[i] = stmt[i].code; - CG_outputRepr* repr = last_compute_cgr_->printRepr(ocg, stmts); - // -- end replacing MMGenerateCode - - //CG_outputRepr *overflow_initialization = ocg->CreateStmtList(); - CG_outputRepr *overflow_initialization = ocg->StmtListAppend(NULL, NULL); - for (std::map<int, std::vector<Free_Var_Decl *> >::const_iterator i = - overflow.begin(); i != overflow.end(); i++) - for (std::vector<Free_Var_Decl *>::const_iterator j = i->second.begin(); - j != i->second.end(); j++) - //overflow_initialization = ocg->StmtListAppend(overflow_initialization, ocg->CreateStmtList(ocg->CreateAssignment(0, ocg->CreateIdent((*j)->base_name()), ocg->CreateInt(0)))); - overflow_initialization = ocg->StmtListAppend( - overflow_initialization, - ocg->StmtListAppend( - ocg->CreateAssignment(0, - ocg->CreateIdent((*j)->base_name()), - ocg->CreateInt(0)), NULL)); - - repr = ocg->StmtListAppend(overflow_initialization, repr); - SgNode *tnl = static_cast<CG_roseRepr *>(repr)->GetCode(); - SgStatementPtrList *list = static_cast<CG_roseRepr *>(repr)->GetList(); - - if (tnl != NULL) - return tnl; - else if (tnl == NULL && list != NULL) { - SgBasicBlock* bb2 = buildBasicBlock(); - - for (SgStatementPtrList::iterator it = (*list).begin(); - it != (*list).end(); it++) - bb2->append_statement(*it); - - tnl = isSgNode(bb2); - } else - throw loop_error("codegen failed"); - - delete repr; - /* - for (int i = 1; i <= m; i++) - delete ni[i]; - */ - return tnl; - -} - -//protonu--adding constructors for the new derived class -LoopCuda::LoopCuda() : - Loop(), code_gen_flags(GenInit) { -} - -LoopCuda::LoopCuda(IR_Control *irc, int loop_num) : - Loop(irc) { - setup_code = NULL; - teardown_code = NULL; - code_gen_flags = 0; - cu_bx = cu_by = cu_tx = cu_ty = cu_tz = 1; - cu_bx_repr = NULL; - cu_tx_repr = NULL; - cu_by_repr = NULL; - cu_ty_repr = NULL; - cu_tz_repr = NULL; - - cu_num_reduce = 0; - cu_mode = GlobalMem; - texture = NULL; - constant_mem = NULL; - - int m = stmt.size(); - //printf("\n the size of stmt(initially) is: %d\n", stmt.size()); - for (int i = 0; i < m; i++) - stmt_nonSplitLevels.push_back(std::vector<int>()); - - globals = ((IR_cudaroseCode *) ir)->gsym_; - globalScope = ((IR_cudaroseCode *) ir)->first_scope; - parameter_symtab = ((IR_cudaroseCode *) ir)->parameter; - body_symtab = ((IR_cudaroseCode *) ir)->body; - func_body = ((IR_cudaroseCode *) ir)->defn; - func_definition = ((IR_cudaroseCode *) ir)->func_defn; - std::vector<SgForStatement *> tf = ((IR_cudaroseCode *) ir)->get_loops(); - - symtab = tf[loop_num]->get_symbol_table(); - - std::vector<SgForStatement *> deepest = find_deepest_loops( - isSgNode(tf[loop_num])); - - for (int i = 0; i < deepest.size(); i++) { - SgVariableSymbol* vs; - SgForInitStatement* list = deepest[i]->get_for_init_stmt(); - SgStatementPtrList& initStatements = list->get_init_stmt(); - SgStatementPtrList::const_iterator j = initStatements.begin(); - if (SgExprStatement *expr = isSgExprStatement(*j)) - if (SgAssignOp* op = isSgAssignOp(expr->get_expression())) - if (SgVarRefExp* var_ref = isSgVarRefExp(op->get_lhs_operand())) - vs = var_ref->get_symbol(); - - index.push_back(vs->get_name().getString().c_str()); //reflects original code index names - } - - for (int i = 0; i < stmt.size(); i++) - idxNames.push_back(index); //refects prefered index names (used as handles in cudaize v2) - useIdxNames = false; - -} - -void LoopCuda::printIS() { - if (!cudaDebug) return; - int k = stmt.size(); - for (int i = 0; i < k; i++) { - printf(" printing statement:%d\n", i); - stmt[i].IS.print(); - } -} - diff --git a/loop_cuda_rose.hh b/loop_cuda_rose.hh deleted file mode 100644 index 5260035..0000000 --- a/loop_cuda_rose.hh +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef LOOP_CUDA_HH -#define LOOP_CUDA_HH - -#include "loop.hh" -#include "mem_mapping_utils.hh" -#include <string.h> -#include "rose.h" -//#include <suif1.h> - -using namespace omega; -using namespace SageBuilder; -enum MemoryMode { GlobalMem, SharedMem, TexMem }; - -struct VarDefs { - std::string name; - std::string secondName; - SgExpression* size_expr; //array size as an expression (can be a product of other variables etc) - SgType* type; - SgVariableSymbol* in_data; //Variable of array to copy data in from (before kernel call) - SgVariableSymbol* out_data; //Variable of array to copy data out to (after kernel call) - std::vector<int> size_multi_dim; //-1 if linearized, the constant size N, of a NxN 2D array otherwise - bool tex_mapped; //protonu-- true if this variable will be texture mapped, so no need to pass it as a argument - bool cons_mapped; - std::string original_name; //this is such a hack, to store the original name, to store a table to textures used -}; - - -class LoopCuda: public Loop{ - -public: - //std::vector<proc_sym*> new_procs; //Need adding to a fse - std::vector< std::vector<std::string> > idxNames; - std::vector< std::pair<int, std::string> > syncs; - bool useIdxNames; - std::vector<std::string> index; - - SgSymbolTable* symtab; - SgSymbolTable* parameter_symtab; - SgSymbolTable* body_symtab; - SgGlobal* globals; - SgGlobal* globalScope; - SgScopeStatement* func_body; - SgFunctionDefinition* func_definition; - //protonu--inserting this here, Gabe's implementation had it - //the struct statment as nonSplitLevels - std::vector<std::vector<int> > stmt_nonSplitLevels; - - texture_memory_mapping *texture; //protonu - constant_memory_mapping *constant_mem; - std::map<std::string, int> array_dims; - omega::CG_outputRepr *setup_code; - omega::CG_outputRepr *teardown_code; - - unsigned int code_gen_flags; - enum CodeGenFlags { - GenInit = 0x00, - GenCudaizeV2 = 0x02, - }; - - - //varibles used by cudaize_codegen - //block x, y sizes, N and num_red - int cu_bx, cu_by, cu_n, cu_num_reduce; - //block statement and level - int cu_block_stmt, cu_block_level; - //thread x, y, z - int cu_tx, cu_ty, cu_tz; - - //Anand: Adding CG_outputRepr* representations of cu_bx, cu_by, cu_tx, cu_ty - //and cu_tz for non constant loop bounds - - CG_outputRepr *cu_bx_repr, *cu_by_repr, *cu_tx_repr, *cu_ty_repr, *cu_tz_repr; - - //tile statements, and loop-levels (cudaize v1) - std::vector< std::vector<int> > cu_thread_loop; - std::vector<int> cu_thread_sync; - MemoryMode cu_mode; - - std::string cu_nx_name, cu_ny_name, cu_kernel_name; - int nonDummyLevel(int stmt, int level); - bool symbolExists(std::string s); - void addSync(int stmt, std::string idx); - void renameIndex(int stmt, std::string idx, std::string newName); - bool validIndexes(int stmt, const std::vector<std::string>& idxs); - CG_outputRepr* extractCudaUB(int stmt_num, int level, int &outUpperBound, int &outLowerBound); - - void printCode(int effort=1, bool actuallyPrint=true) const; - void printRuntimeInfo() const; - void printIndexes() const; - SgNode* getCode(int effort = 1) const; - void printIS(); - - - void permute_cuda(int stmt, const std::vector<std::string>& curOrder); - //protonu-writing a wrapper for the Chun's new permute function - bool permute(int stmt_num, const std::vector<int> &pi); - //end--protonu. - void tile_cuda(int stmt, int level, int outer_level); - void tile_cuda(int level, int tile_size, int outer_level, std::string idxName, std::string ctrlName, TilingMethodType method=StridedTile); - void tile_cuda(int stmt, int level, int tile_size, int outer_level, std::string idxName, std::string ctrlName, TilingMethodType method=StridedTile); - bool datacopy_privatized_cuda(int stmt_num, int level, const std::string &array_name, const std::vector<int> &privatized_levels, bool allow_extra_read = false, int fastest_changing_dimension = -1, int padding_stride = 1, int padding_alignment = 1, bool cuda_shared=false); - bool datacopy_cuda(int stmt_num, int level, const std::string &array_name, std::vector<std::string> new_idxs, bool allow_extra_read = false, int fastest_changing_dimension = -1, int padding_stride = 1, int padding_alignment = 4, bool cuda_shared=false); - bool unroll_cuda(int stmt_num, int level, int unroll_amount); - //protonu--using texture memory - void copy_to_texture(const char *array_name); - void copy_to_constant(const char *array_name); - int findCurLevel(int stmt, std::string idx); - /** - * - * @param kernel_name Name of the GPU generated kernel - * @param nx Iteration space over the x dimention - * @param ny Iteration space over the y dimention - * @param tx Tile dimention over x dimention - * @param ty Tile dimention over the y dimention - * @param num_reduce The number of dimentions to reduce by mapping to the GPU implicit blocks/threads - */ - //stmnt_num is referenced from the perspective of being inside the cudize block loops - bool cudaize_v2(std::string kernel_name, std::map<std::string, int> array_dims, - std::vector<std::string> blockIdxs, std::vector<std::string> threadIdxs); - SgNode* cudaize_codegen_v2(); - SgNode* codegen(); - - //protonu--have to add the constructors for the new class - //and maybe destructors (?) - LoopCuda(); - //LoopCuda(IR_Code *ir, tree_for *tf, global_symtab* gsym); - LoopCuda(IR_Control *ir_c, int loop_num);//protonu-added so as to not change ir_suif - ~LoopCuda(); - -}; - -#endif diff --git a/loop_modified.cc b/loop_modified.cc deleted file mode 100644 index 9686f6d..0000000 --- a/loop_modified.cc +++ /dev/null @@ -1,4234 +0,0 @@ -/***************************************************************************** - Copyright (C) 2008 University of Southern California - Copyright (C) 2009-2010 University of Utah - All Rights Reserved. - - Purpose: - Core loop transformation functionality. - - Notes: - "level" (starting from 1) means loop level and it corresponds to "dim" - (starting from 0) in transformed iteration space [c_1,l_1,c_2,l_2,...., - c_n,l_n,c_(n+1)], e.g., l_2 is loop level 2 in generated code, dim 3 - in transformed iteration space, and variable 4 in Omega relation. - All c's are constant numbers only and they will not show up as actual loops. - Formula: - dim = 2*level - 1 - var = dim + 1 - - History: - 10/2005 Created by Chun Chen. - 09/2009 Expand tile functionality, -chun - 10/2009 Initialize unfusible loop nest without bailing out, -chun -*****************************************************************************/ - -#include <limits.h> -#include <math.h> -#include <code_gen/code_gen.h> -#include <code_gen/CG_outputBuilder.h> -#include <code_gen/output_repr.h> -#include <iostream> -#include <map> -#include "loop.hh" -#include "omegatools.hh" -#include "irtools.hh" -#include "chill_error.hh" -#include <string.h> -using namespace omega; - -const std::string Loop::tmp_loop_var_name_prefix = std::string("_t"); -const std::string Loop::overflow_var_name_prefix = std::string("over"); - -//----------------------------------------------------------------------------- -// Class Loop -//----------------------------------------------------------------------------- - -bool Loop::init_loop(std::vector<ir_tree_node *> &ir_tree, - std::vector<ir_tree_node *> &ir_stmt) { - ir_stmt = extract_ir_stmts(ir_tree); - stmt_nesting_level_.resize(ir_stmt.size()); - std::vector<int> stmt_nesting_level(ir_stmt.size()); - for (int i = 0; i < ir_stmt.size(); i++) { - ir_stmt[i]->payload = i; - int t = 0; - ir_tree_node *itn = ir_stmt[i]; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) - t++; - } - stmt_nesting_level_[i] = t; - stmt_nesting_level[i] = t; - } - - stmt = std::vector<Statement>(ir_stmt.size()); - int n_dim = -1; - int max_loc; - //std::vector<std::string> index; - for (int i = 0; i < ir_stmt.size(); i++) { - int max_nesting_level = -1; - int loc; - for (int j = 0; j < ir_stmt.size(); j++) - if (stmt_nesting_level[j] > max_nesting_level) { - max_nesting_level = stmt_nesting_level[j]; - loc = j; - } - - // most deeply nested statement acting as a reference point - if (n_dim == -1) { - n_dim = max_nesting_level; - max_loc = loc; - - index = std::vector<std::string>(n_dim); - - ir_tree_node *itn = ir_stmt[loc]; - int cur_dim = n_dim - 1; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) { - index[cur_dim] = - static_cast<IR_Loop *>(itn->content)->index()->name(); - itn->payload = cur_dim--; - } - } - } - - // align loops by names, temporary solution - ir_tree_node *itn = ir_stmt[loc]; - int depth = stmt_nesting_level_[loc] - 1; - /* while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP && itn->payload == -1) { - std::string name = static_cast<IR_Loop *>(itn->content)->index()->name(); - for (int j = 0; j < n_dim; j++) - if (index[j] == name) { - itn->payload = j; - break; - } - if (itn->payload == -1) - throw loop_error("no complex alignment yet"); - } - } - */ - for (int t = depth; t >= 0; t--) { - int y = t; - ir_tree_node *itn = ir_stmt[loc]; - - while ((itn->parent != NULL) && (y >= 0)) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) - y--; - } - - if (itn->content->type() == IR_CONTROL_LOOP && itn->payload == -1) { - CG_outputBuilder *ocg = ir_->builder(); - - itn->payload = depth - t; - - CG_outputRepr *code = - static_cast<IR_Block *>(ir_stmt[loc]->content)->extract(); - - Tuple<CG_outputRepr *> index_expr; - Tuple<std::string> old_index; - CG_outputRepr *repl = ocg->CreateIdent(index[itn->payload]); - index_expr.append(repl); - old_index.append( - static_cast<IR_Loop *>(itn->content)->index()->name()); - - code = ocg->CreatePlaceHolder(0, code, index_expr, old_index); - replace.insert(std::pair<int, CG_outputRepr*>(loc, code)); - //stmt[loc].code = code; - - } - } - - // set relation variable names - Relation r(n_dim); - F_And *f_root = r.add_and(); - itn = ir_stmt[loc]; - int temp_depth = depth; - while (itn->parent != NULL) { - - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) { - r.name_set_var(itn->payload + 1, index[temp_depth]); - - temp_depth--; - } - //static_cast<IR_Loop *>(itn->content)->index()->name()); - } - - /*while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP) - r.name_set_var(itn->payload+1, static_cast<IR_Loop *>(itn->content)->index()->name()); - }*/ - - // extract information from loop/if structures - std::vector<bool> processed(n_dim, false); - Tuple<std::string> vars_to_be_reversed; - itn = ir_stmt[loc]; - while (itn->parent != NULL) { - itn = itn->parent; - - switch (itn->content->type()) { - case IR_CONTROL_LOOP: { - IR_Loop *lp = static_cast<IR_Loop *>(itn->content); - Variable_ID v = r.set_var(itn->payload + 1); - int c; - - try { - c = lp->step_size(); - if (c > 0) { - CG_outputRepr *lb = lp->lower_bound(); - exp2formula(ir, r, f_root, freevar, lb, v, 's', - IR_COND_GE, true); - CG_outputRepr *ub = lp->upper_bound(); - IR_CONDITION_TYPE cond = lp->stop_cond(); - if (cond == IR_COND_LT || cond == IR_COND_LE) - exp2formula(ir, r, f_root, freevar, ub, v, 's', - cond, true); - else - throw ir_error("loop condition not supported"); - - } else if (c < 0) { - CG_outputBuilder *ocg = ir->builder(); - CG_outputRepr *lb = lp->lower_bound(); - lb = ocg->CreateMinus(NULL, lb); - exp2formula(ir, r, f_root, freevar, lb, v, 's', - IR_COND_GE, true); - CG_outputRepr *ub = lp->upper_bound(); - ub = ocg->CreateMinus(NULL, ub); - IR_CONDITION_TYPE cond = lp->stop_cond(); - if (cond == IR_COND_GE) - exp2formula(ir, r, f_root, freevar, ub, v, 's', - IR_COND_LE, true); - else if (cond == IR_COND_GT) - exp2formula(ir, r, f_root, freevar, ub, v, 's', - IR_COND_LT, true); - else - throw ir_error("loop condition not supported"); - - vars_to_be_reversed.append(lp->index()->name()); - } else - throw ir_error("loop step size zero"); - } catch (const ir_error &e) { - for (int i = 0; i < itn->children.size(); i++) - delete itn->children[i]; - itn->children = std::vector<ir_tree_node *>(); - itn->content = itn->content->convert(); - return false; - } - - if (abs(c) != 1) { - F_Exists *f_exists = f_root->add_exists(); - Variable_ID e = f_exists->declare(); - F_And *f_and = f_exists->add_and(); - Stride_Handle h = f_and->add_stride(abs(c)); - if (c > 0) - h.update_coef(e, 1); - else - h.update_coef(e, -1); - h.update_coef(v, -1); - CG_outputRepr *lb = lp->lower_bound(); - exp2formula(ir, r, f_and, freevar, lb, e, 's', IR_COND_EQ, - true); - } - - processed[itn->payload] = true; - break; - } - case IR_CONTROL_IF: { - CG_outputRepr *cond = - static_cast<IR_If *>(itn->content)->condition(); - try { - if (itn->payload % 2 == 1) - exp2constraint(ir, r, f_root, freevar, cond, true); - else { - F_Not *f_not = f_root->add_not(); - F_And *f_and = f_not->add_and(); - exp2constraint(ir, r, f_and, freevar, cond, true); - } - } catch (const ir_error &e) { - std::vector<ir_tree_node *> *t; - if (itn->parent == NULL) - t = &ir_tree; - else - t = &(itn->parent->children); - int id = itn->payload; - int i = t->size() - 1; - while (i >= 0) { - if ((*t)[i] == itn) { - for (int j = 0; j < itn->children.size(); j++) - delete itn->children[j]; - itn->children = std::vector<ir_tree_node *>(); - itn->content = itn->content->convert(); - } else if ((*t)[i]->payload >> 1 == id >> 1) { - delete (*t)[i]; - t->erase(t->begin() + i); - } - i--; - } - return false; - } - - break; - } - default: - for (int i = 0; i < itn->children.size(); i++) - delete itn->children[i]; - itn->children = std::vector<ir_tree_node *>(); - itn->content = itn->content->convert(); - return false; - } - } - - // add information for missing loops - for (int j = 0; j < n_dim; j++) - if (!processed[j]) { - ir_tree_node *itn = ir_stmt[max_loc]; - while (itn->parent != NULL) { - itn = itn->parent; - if (itn->content->type() == IR_CONTROL_LOOP - && itn->payload == j) - break; - } - - Variable_ID v = r.set_var(j + 1); - if (loc < max_loc) { - CG_outputRepr *lb = - static_cast<IR_Loop *>(itn->content)->lower_bound(); - exp2formula(ir, r, f_root, freevar, lb, v, 's', IR_COND_EQ, - true); - } else { // loc > max_loc - CG_outputRepr *ub = - static_cast<IR_Loop *>(itn->content)->upper_bound(); - exp2formula(ir, r, f_root, freevar, ub, v, 's', IR_COND_EQ, - true); - } - } - - r.setup_names(); - r.simplify(); - - // insert the statement - CG_outputBuilder *ocg = ir->builder(); - Tuple<CG_outputRepr *> reverse_expr; - for (int j = 1; j <= vars_to_be_reversed.size(); j++) { - CG_outputRepr *repl = ocg->CreateIdent(vars_to_be_reversed[j]); - repl = ocg->CreateMinus(NULL, repl); - reverse_expr.append(repl); - } - CG_outputRepr *code = - static_cast<IR_Block *>(ir_stmt[loc]->content)->original(); - code = ocg->CreatePlaceHolder(0, code, reverse_expr, - vars_to_be_reversed); - stmt[loc].code = code; - stmt[loc].IS = r; - stmt[loc].loop_level = std::vector<LoopLevel>(n_dim); - for (int i = 0; i < n_dim; i++) { - stmt[loc].loop_level[i].type = LoopLevelOriginal; - stmt[loc].loop_level[i].payload = i; - stmt[loc].loop_level[i].parallel_level = 0; - } - - stmt_nesting_level[loc] = -1; - } - - return true; -} - -Loop::Loop(const IR_Control *control) { - ir = const_cast<IR_Code *>(control->ir_); - init_code = NULL; - cleanup_code = NULL; - tmp_loop_var_name_counter = 1; - overflow_var_name_counter = 1; - known = Relation::True(0); - - std::vector<ir_tree_node *> ir_tree = build_ir_tree(control->clone(), NULL); - std::vector<ir_tree_node *> ir_stmt; - - while (!init_loop(ir_tree, ir_stmt)) { - } - - // init the dependence graph - for (int i = 0; i < stmt.size(); i++) - dep.insert(); - - for (int i = 0; i < stmt.size(); i++) - for (int j = i; j < stmt.size(); j++) { - std::pair<std::vector<DependenceVector>, - std::vector<DependenceVector> > dv = test_data_dependences( - ir_, stmt[i].code, stmt[i].IS, stmt[j].code, stmt[j].IS, - freevar, index, stmt_nesting_level_[i], - stmt_nesting_level[j]); - - for (int k = 0; k < dv.first.size(); k++) { - if (is_dependence_valid(ir_stmt[i], ir_stmt[j], dv.first[k], - true)) - dep.connect(i, j, dv.first[k]); - else { - dep.connect(j, i, dv.first[k].reverse()); - } - - } - for (int k = 0; k < dv.second.size(); k++) - if (is_dependence_valid(ir_stmt[j], ir_stmt[i], dv.second[k], - false)) - dep.connect(j, i, dv.second[k]); - else { - dep.connect(i, j, dv.second[k].reverse()); - } - // std::pair<std::vector<DependenceVector>, - // std::vector<DependenceVector> > dv_ = test_data_dependences( - - } - - for (int i = 0; i < stmt.size(); i++) { - std::map<int, CG_outputRepr*>::iterator it = replace.find(i); - - if (it != replace.end()) - stmt[i].code = (it->second)->clone(); - else - stmt[i].code = stmt[i].code->clone(); - } - - // cleanup the IR tree - for (int i = 0; i < ir_tree.size(); i++) - delete ir_tree[i]; - - // init dumb transformation relations e.g. [i, j] -> [ 0, i, 0, j, 0] - for (int i = 0; i < stmt.size(); i++) { - int n = stmt[i].IS.n_set(); - stmt[i].xform = Relation(n, 2 * n + 1); - F_And *f_root = stmt[i].xform.add_and(); - - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(stmt[i].xform.output_var(2 * j), 1); - h.update_coef(stmt[i].xform.input_var(j), -1); - } - - for (int j = 1; j <= 2 * n + 1; j += 2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(stmt[i].xform.output_var(j), 1); - } - stmt[i].xform.simplify(); - } - - if (stmt.size() != 0) - num_dep_dim = stmt[0].IS.n_set(); - else - num_dep_dim = 0; -} - -Loop::~Loop() { - for (int i = 0; i < stmt.size(); i++) - if (stmt[i].code != NULL) { - stmt[i].code->clear(); - delete stmt[i].code; - } - if (init_code != NULL) { - init_code->clear(); - delete init_code; - } - if (cleanup_code != NULL) { - cleanup_code->clear(); - delete cleanup_code; - } -} - -int Loop::get_dep_dim_of(int stmt_num, int level) const { - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invaid statement " + to_string(stmt_num)); - - if (level < 1 || level > stmt[stmt_num].loop_level.size()) - return -1; - - int trip_count = 0; - while (true) { - switch (stmt[stmt_num].loop_level[level - 1].type) { - case LoopLevelOriginal: - return stmt[stmt_num].loop_level[level - 1].payload; - case LoopLevelTile: - level = stmt[stmt_num].loop_level[level - 1].payload; - if (level < 1) - return -1; - if (level > stmt[stmt_num].loop_level.size()) - throw loop_error( - "incorrect loop level information for statement " - + to_string(stmt_num)); - break; - default: - throw loop_error( - "unknown loop level information for statement " - + to_string(stmt_num)); - } - trip_count++; - if (trip_count >= stmt[stmt_num].loop_level.size()) - throw loop_error( - "incorrect loop level information for statement " - + to_string(stmt_num)); - } -} - -int Loop::get_last_dep_dim_before(int stmt_num, int level) const { - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invaid statement " + to_string(stmt_num)); - - if (level < 1) - return -1; - if (level > stmt[stmt_num].loop_level.size()) - level = stmt[stmt_num].loop_level.size() + 1; - - for (int i = level - 1; i >= 1; i--) - if (stmt[stmt_num].loop_level[i - 1].type == LoopLevelOriginal) - return stmt[stmt_num].loop_level[i - 1].payload; - - return -1; -} - -void Loop::print_internal_loop_structure() const { - for (int i = 0; i < stmt.size(); i++) { - std::vector<int> lex = getLexicalOrder(i); - std::cout << "s" << i + 1 << ": "; - for (int j = 0; j < stmt[i].loop_level.size(); j++) { - if (2 * j < lex.size()) - std::cout << lex[2 * j]; - switch (stmt[i].loop_level[j].type) { - case LoopLevelOriginal: - std::cout << "(dim:" << stmt[i].loop_level[j].payload << ")"; - break; - case LoopLevelTile: - std::cout << "(tile:" << stmt[i].loop_level[j].payload << ")"; - break; - default: - std::cout << "(unknown)"; - } - std::cout << ' '; - } - for (int j = 2 * stmt[i].loop_level.size(); j < lex.size(); j += 2) { - std::cout << lex[j]; - if (j != lex.size() - 1) - std::cout << ' '; - } - std::cout << std::endl; - } -} - -CG_outputRepr *Loop::getCode(int effort) const { - const int m = stmt.size(); - if (m == 0) - return NULL; - const int n = stmt[0].xform.n_out(); - - Tuple<CG_outputRepr *> ni(m); - Tuple < Relation > IS(m); - Tuple < Relation > xform(m); - for (int i = 0; i < m; i++) { - ni[i + 1] = stmt[i].code; - IS[i + 1] = stmt[i].IS; - xform[i + 1] = stmt[i].xform; - } - - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - CG_outputBuilder *ocg = ir->builder(); - CG_outputRepr *repr = MMGenerateCode(ocg, xform, IS, ni, known, effort); - - if (init_code != NULL) - repr = ocg->StmtListAppend(init_code->clone(), repr); - if (cleanup_code != NULL) - repr = ocg->StmtListAppend(repr, cleanup_code->clone()); - - return repr; -} - -void Loop::printCode(int effort) const { - const int m = stmt.size(); - if (m == 0) - return; - const int n = stmt[0].xform.n_out(); - - Tuple < Relation > IS(m); - Tuple < Relation > xform(m); - for (int i = 0; i < m; i++) { - IS[i + 1] = stmt[i].IS; - xform[i + 1] = stmt[i].xform; - } - - Relation known = Extend_Set(copy(this->known), n - this->known.n_set()); - std::cout << MMGenerateCode(xform, IS, known, effort); -} - -Relation Loop::getNewIS(int stmt_num) const { - Relation result; - - if (stmt[stmt_num].xform.is_null()) { - Relation known = Extend_Set(copy(this->known), - stmt[stmt_num].IS.n_set() - this->known.n_set()); - result = Intersection(copy(stmt[stmt_num].IS), known); - } else { - Relation known = Extend_Set(copy(this->known), - stmt[stmt_num].xform.n_out() - this->known.n_set()); - result = Intersection( - Range( - Restrict_Domain(copy(stmt[stmt_num].xform), - copy(stmt[stmt_num].IS))), known); - } - - result.simplify(2, 4); - - return result; -} - -std::vector<Relation> Loop::getNewIS() const { - const int m = stmt.size(); - - std::vector<Relation> new_IS(m); - for (int i = 0; i < m; i++) - new_IS[i] = getNewIS(i); - - return new_IS; -} - -void Loop::permute(const std::vector<int> &pi) { - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - - permute(active, pi); -} - -void Loop::original() { - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - setLexicalOrder(0, active); -} - -void Loop::permute(const std::set<int> &active, const std::vector<int> &pi) { - if (active.size() == 0 || pi.size() == 0) - return; - - // check for sanity of parameters - int level = pi[0]; - for (int i = 1; i < pi.size(); i++) - if (pi[i] < level) - level = pi[i]; - if (level < 1) - throw std::invalid_argument("invalid permuation"); - std::vector<int> reverse_pi(pi.size(), 0); - for (int i = 0; i < pi.size(); i++) - if (pi[i] >= level + pi.size()) - throw std::invalid_argument("invalid permutation"); - else - reverse_pi[pi[i] - level] = i + level; - for (int i = 0; i < reverse_pi.size(); i++) - if (reverse_pi[i] == 0) - throw std::invalid_argument("invalid permuation"); - int ref_stmt_num; - std::vector<int> lex; - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - if (*i < 0 || *i >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(*i)); - if (i == active.begin()) { - ref_stmt_num = *i; - lex = getLexicalOrder(*i); - } else { - if (level + pi.size() - 1 > stmt[*i].loop_level.size()) - throw std::invalid_argument("invalid permuation"); - std::vector<int> lex2 = getLexicalOrder(*i); - for (int j = 0; j < 2 * level - 3; j += 2) - if (lex[j] != lex2[j]) - throw std::invalid_argument( - "statements to permute must be in the same subloop"); - for (int j = 0; j < pi.size(); j++) - if (!(stmt[*i].loop_level[level + j - 1].type - == stmt[ref_stmt_num].loop_level[level + j - 1].type - && stmt[*i].loop_level[level + j - 1].payload - == stmt[ref_stmt_num].loop_level[level + j - 1].payload)) - throw std::invalid_argument( - "permuted loops must have the same loop level types"); - } - } - - // Update transformation relations - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - int n = stmt[*i].xform.n_out(); - Relation mapping(n, n); - F_And *f_root = mapping.add_and(); - for (int j = 1; j <= n; j += 2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(j), 1); - h.update_coef(mapping.input_var(j), -1); - } - for (int j = 0; j < pi.size(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2 * (level + j)), 1); - h.update_coef(mapping.input_var(2 * pi[j]), -1); - } - for (int j = 1; j < level; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2 * j), 1); - h.update_coef(mapping.input_var(2 * j), -1); - } - for (int j = level + pi.size(); j <= stmt[*i].loop_level.size(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2 * j), 1); - h.update_coef(mapping.input_var(2 * j), -1); - } - - stmt[*i].xform = Composition(mapping, stmt[*i].xform); - stmt[*i].xform.simplify(); - } - - // get the permuation for dependence vectors - std::vector<int> t; - for (int i = 0; i < pi.size(); i++) - if (stmt[ref_stmt_num].loop_level[pi[i] - 1].type == LoopLevelOriginal) - t.push_back(stmt[ref_stmt_num].loop_level[pi[i] - 1].payload); - int max_dep_dim = -1; - int min_dep_dim = num_dep_dim; - for (int i = 0; i < t.size(); i++) { - if (t[i] > max_dep_dim) - max_dep_dim = t[i]; - if (t[i] < min_dep_dim) - min_dep_dim = t[i]; - } - if (min_dep_dim > max_dep_dim) - return; - if (max_dep_dim - min_dep_dim + 1 != t.size()) - throw loop_error("cannot update the dependence graph after permuation"); - std::vector<int> dep_pi(num_dep_dim); - for (int i = 0; i < min_dep_dim; i++) - dep_pi[i] = i; - for (int i = min_dep_dim; i <= max_dep_dim; i++) - dep_pi[i] = t[i - min_dep_dim]; - for (int i = max_dep_dim + 1; i < num_dep_dim; i++) - dep_pi[i] = i; - - // update the dependence graph - DependenceGraph g; - for (int i = 0; i < dep.vertex.size(); i++) - g.insert(); - for (int i = 0; i < dep.vertex.size(); i++) - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); - j++) { - if ((active.find(i) != active.end() - && active.find(j->first) != active.end())) { - std::vector<DependenceVector> dv = j->second; - for (int k = 0; k < dv.size(); k++) { - switch (dv[k].type) { - case DEP_W2R: - case DEP_R2W: - case DEP_W2W: - case DEP_R2R: { - std::vector<coef_t> lbounds(num_dep_dim); - std::vector<coef_t> ubounds(num_dep_dim); - for (int d = 0; d < num_dep_dim; d++) { - lbounds[d] = dv[k].lbounds[dep_pi[d]]; - ubounds[d] = dv[k].ubounds[dep_pi[d]]; - } - dv[k].lbounds = lbounds; - dv[k].ubounds = ubounds; - break; - } - case DEP_CONTROL: { - break; - } - default: - throw loop_error("unknown dependence type"); - } - } - g.connect(i, j->first, dv); - } else if (active.find(i) == active.end() - && active.find(j->first) == active.end()) { - std::vector<DependenceVector> dv = j->second; - g.connect(i, j->first, dv); - } else { - std::vector<DependenceVector> dv = j->second; - for (int k = 0; k < dv.size(); k++) - switch (dv[k].type) { - case DEP_W2R: - case DEP_R2W: - case DEP_W2W: - case DEP_R2R: { - for (int d = 0; d < num_dep_dim; d++) - if (dep_pi[d] != d) { - dv[k].lbounds[d] = -posInfinity; - dv[k].ubounds[d] = posInfinity; - } - break; - } - case DEP_CONTROL: - break; - default: - throw loop_error("unknown dependence type"); - } - g.connect(i, j->first, dv); - } - } - dep = g; - - // update loop level information - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - int cur_dep_dim = min_dep_dim; - std::vector<LoopLevel> new_loop_level(stmt[*i].loop_level.size()); - for (int j = 1; j <= stmt[*i].loop_level.size(); j++) - if (j >= level && j < level + pi.size()) { - switch (stmt[*i].loop_level[reverse_pi[j - level] - 1].type) { - case LoopLevelOriginal: - new_loop_level[j - 1].type = LoopLevelOriginal; - new_loop_level[j - 1].payload = cur_dep_dim++; - new_loop_level[j - 1].parallel_level = - stmt[*i].loop_level[reverse_pi[j - level] - 1].parallel_level; - break; - case LoopLevelTile: { - new_loop_level[j - 1].type = LoopLevelTile; - int ref_level = stmt[*i].loop_level[reverse_pi[j - level] - - 1].payload; - if (ref_level >= level && ref_level < level + pi.size()) - new_loop_level[j - 1].payload = reverse_pi[ref_level - - level]; - else - new_loop_level[j - 1].payload = ref_level; - new_loop_level[j - 1].parallel_level = - stmt[*i].loop_level[reverse_pi[j - level] - 1].parallel_level; - break; - } - default: - throw loop_error( - "unknown loop level information for statement " - + to_string(*i)); - } - } else { - switch (stmt[*i].loop_level[j - 1].type) { - case LoopLevelOriginal: - new_loop_level[j - 1].type = LoopLevelOriginal; - new_loop_level[j - 1].payload = - stmt[*i].loop_level[j - 1].payload; - new_loop_level[j - 1].parallel_level = stmt[*i].loop_level[j - - 1].parallel_level; - break; - case LoopLevelTile: { - new_loop_level[j - 1].type = LoopLevelTile; - int ref_level = stmt[*i].loop_level[j - 1].payload; - if (ref_level >= level && ref_level < level + pi.size()) - new_loop_level[j - 1].payload = reverse_pi[ref_level - - level]; - else - new_loop_level[j - 1].payload = ref_level; - new_loop_level[j - 1].parallel_level = stmt[*i].loop_level[j - - 1].parallel_level; - break; - } - default: - throw loop_error( - "unknown loop level information for statement " - + to_string(*i)); - } - } - stmt[*i].loop_level = new_loop_level; - } - - setLexicalOrder(2 * level - 2, active); -} - -std::set<int> Loop::split(int stmt_num, int level, const Relation &cond) { - // check for sanity of parameters - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - std::set<int> result; - int dim = 2 * level - 1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim - 1); - - Relation cond2 = copy(cond); - cond2.simplify(); - cond2 = EQs_to_GEQs(cond2); - Conjunct *c = cond2.single_conjunct(); - int cur_lex = lex[dim - 1]; - for (GEQ_Iterator gi(c->GEQs()); gi; gi++) { - int max_level = (*gi).max_tuple_pos(); - Relation single_cond(max_level); - single_cond.and_with_GEQ(*gi); - - // TODO: should decide where to place newly created statements with - // complementary split condition from dependence graph. - bool place_after; - if (max_level == 0) - place_after = true; - else if ((*gi).get_coef(cond2.set_var(max_level)) < 0) - place_after = true; - else - place_after = false; - - // original statements with split condition, - // new statements with complement of split condition - int old_num_stmt = stmt.size(); - std::map<int, int> what_stmt_num; - apply_xform(same_loop); - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) { - int n = stmt[*i].IS.n_set(); - Relation part1, part2; - if (max_level > n) { - part1 = copy(stmt[*i].IS); - part2 = Relation::False(0); - } else { - part1 = Intersection(copy(stmt[*i].IS), - Extend_Set(copy(single_cond), n - max_level)); - part2 = Intersection(copy(stmt[*i].IS), - Extend_Set(Complement(copy(single_cond)), - n - max_level)); - } - - //split dependence check - - if (max_level > level) { - - DNF_Iterator di1(stmt[*i].IS.query_DNF()); - DNF_Iterator di2(part1.query_DNF()); - for (; di1 && di2; di1++, di2++) { - //printf("In next conjunct,\n"); - EQ_Iterator ei1 = (*di1)->EQs(); - EQ_Iterator ei2 = (*di2)->EQs(); - for (; ei1 && ei2; ei1++, ei2++) { - //printf(" In next equality constraint,\n"); - Constr_Vars_Iter cvi1(*ei1); - Constr_Vars_Iter cvi2(*ei2); - int dimension = (*cvi1).var->get_position(); - int same = 0; - bool identical = false; - if (identical = !strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name())) { - - for (; cvi1 && cvi2; cvi1++, cvi2++) { - - if (((*cvi1).coef != (*cvi2).coef - || (*ei1).get_const() - != (*ei2).get_const()) - || (strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name()))) { - - same++; - } - } - } - if ((same != 0) || !identical) { - - dimension = dimension - 1; - - while (stmt[*i].loop_level[dimension].type - == LoopLevelTile) - dimension = xform_index[dimension].first; - - dimension = stmt[*i].loop_level[dimension].payload; - - for (int i = 0; i < stmt.size(); i++) { - std::vector<std::pair<int, DependenceVector> > D; - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end(); j++) { - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if ((dv.hasNegative(dimension) - && !dv.quasi) - || (dv.hasPositive(dimension) - && dv.quasi)) - - throw loop_error( - "loop error: Split is illegal, dependence violation!"); - - } - } - } - - } - - GEQ_Iterator gi1 = (*di1)->GEQs(); - GEQ_Iterator gi2 = (*di2)->GEQs(); - - for (; gi1 && gi2; gi++, gi2++) { - - Constr_Vars_Iter cvi1(*gi1); - Constr_Vars_Iter cvi2(*gi2); - int dimension = (*cvi1).var->get_position(); - int same = 0; - bool identical = false; - if (identical = !strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name())) { - - for (; cvi1 && cvi2; cvi1++, cvi2++) { - - if (((*cvi1).coef != (*cvi2).coef - || (*gi1).get_const() - != (*gi2).get_const()) - || (strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name()))) { - - same++; - } - } - } - if ((same != 0) || !identical) { - dimension = dimension - 1; - - while (stmt[*i].loop_level[dimension].type - == LoopLevelTile) - dimension = xform_index[dimension].first; - - dimension = - stmt[*i].loop_level[dimension].payload; - - for (int i = 0; i < stmt.size(); i++) { - std::vector<std::pair<int, DependenceVector> > D; - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end(); - j++) { - for (int k = 0; k < j->second.size(); - k++) { - DependenceVector dv = j->second[k]; - if ((dv.hasNegative(dimension) - && !dv.quasi) - || (dv.hasPositive( - dimension) - && dv.quasi)) - - throw loop_error( - "loop error: Split is illegal, dependence violation!"); - - } - } - } - - } - - } - - } - - } - - DNF_Iterator di3(stmt[*i].IS.query_DNF()); - DNF_Iterator di4(part2.query_DNF()); - for (; di3 && di4; di3++, di4++) { - EQ_Iterator ei1 = (*di3)->EQs(); - EQ_Iterator ei2 = (*di4)->EQs(); - for (; ei1 && ei2; ei1++, ei2++) { - Constr_Vars_Iter cvi1(*ei1); - Constr_Vars_Iter cvi2(*ei2); - int dimension = (*cvi1).var->get_position(); - int same = 0; - bool identical = false; - if (identical = !strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name())) { - - for (; cvi1 && cvi2; cvi1++, cvi2++) { - - if (((*cvi1).coef != (*cvi2).coef - || (*ei1).get_const() - != (*ei2).get_const()) - || (strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name()))) { - - same++; - } - } - } - if ((same != 0) || !identical) { - dimension = dimension - 1; - - while (stmt[*i].loop_level[dimension].type - == LoopLevelTile) - dimension = xform_index[dimension].first; - - dimension = stmt[*i].loop_level[dimension].payload; - - for (int i = 0; i < stmt.size(); i++) { - std::vector<std::pair<int, DependenceVector> > D; - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end(); j++) { - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if ((dv.hasNegative(dimension) - && !dv.quasi) - || (dv.hasPositive(dimension) - && dv.quasi)) - - throw loop_error( - "loop error: Split is illegal, dependence violation!"); - - } - } - } - - } - - } - GEQ_Iterator gi1 = (*di3)->GEQs(); - GEQ_Iterator gi2 = (*di4)->GEQs(); - - for (; gi1 && gi2; gi++, gi2++) { - Constr_Vars_Iter cvi1(*gi1); - Constr_Vars_Iter cvi2(*gi2); - int dimension = (*cvi1).var->get_position(); - int same = 0; - bool identical = false; - if (identical = !strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name())) { - - for (; cvi1 && cvi2; cvi1++, cvi2++) { - - if (((*cvi1).coef != (*cvi2).coef - || (*gi1).get_const() - != (*gi2).get_const()) - || (strcmp((*cvi1).var->char_name(), - (*cvi2).var->char_name()))) { - - same++; - } - } - } - if ((same != 0) || !identical) { - dimension = dimension - 1; - - while (stmt[*i].loop_level[dimension].type - == LoopLevelTile) - dimension = xform_index[dimension].first; - - dimension = stmt[*i].loop_level[dimension].payload; - - for (int i = 0; i < stmt.size(); i++) { - std::vector<std::pair<int, DependenceVector> > D; - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end(); j++) { - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if ((dv.hasNegative(dimension) - && !dv.quasi) - || (dv.hasPositive(dimension) - && dv.quasi)) - - throw loop_error( - "loop error: Split is illegal, dependence violation!"); - - } - } - } - - } - - } - - } - - } - - stmt[*i].IS = part1; - - if (Intersection(copy(part2), - Extend_Set(copy(this->known), n - this->known.n_set())).is_upper_bound_satisfiable()) { - Statement new_stmt; - new_stmt.code = stmt[*i].code->clone(); - new_stmt.IS = part2; - new_stmt.xform = copy(stmt[*i].xform); - - new_stmt.loop_level = stmt[*i].loop_level; - stmt.push_back(new_stmt); - dep.insert(); - what_stmt_num[*i] = stmt.size() - 1; - if (*i == stmt_num) - result.insert(stmt.size() - 1); - - stmt_nesting_level_.push_back(stmt_nesting_level[*i]); - std::pair<std::vector<DependenceVector>, - std::vector<DependenceVector> > dv = - test_data_dependences(ir_, stmt[*i].code, part1, - stmt[*i].code, part2, freevar, index, - stmt_nesting_level[*i], - stmt_nesting_level[stmt.size() - 1]); - - int part1_to_part2 = 0; - int part2_to_part1 = 0; - - for (int k = 0; k < dv.first.size(); k++) - if (is_dependence_valid_based_on_lex_order(*i, - what_stmt_num[*i], dv.first[k], true)) - part1_to_part2++; - else - part2_to_part1++; - - if (part1_to_part2 > 0 && part2_to_part1 > 0) - throw loop_error( - "loop error: Aborting, split resulted in impossible dependence cycle!"); - - for (int k = 0; k < dv.second.size(); k++) - if (is_dependence_valid_based_on_lex_order( - what_stmt_num[*i], *i, dv.second[k], false)) - part2_to_part1++; - - else - part1_to_part2++; - - if (part1_to_part2 > 0 && part2_to_part1 > 0) - throw loop_error( - "loop error: Aborting, split resulted in impossible dependence cycle!"); - bool temp_place_after; - if (part2_to_part1 > 0) - temp_place_after = false; - else - temp_place_after = true; - - if (i == same_loop.begin()) - place_after = temp_place_after; - else { - if (temp_place_after != place_after) - throw loop_error( - "loop error: Aborting, split resulted in impossible dependence cycle!"); - - } - - if (place_after) - assign_const(new_stmt.xform, dim - 1, cur_lex + 1); - else - assign_const(new_stmt.xform, dim - 1, cur_lex - 1); - - } - - } - // make adjacent lexical number available for new statements - if (place_after) { - lex[dim - 1] = cur_lex + 1; - shiftLexicalOrder(lex, dim - 1, 1); - } else { - lex[dim - 1] = cur_lex - 1; - shiftLexicalOrder(lex, dim - 1, -1); - } - // update dependence graph - int dep_dim = get_dep_dim_of(stmt_num, level); - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::pair<int, std::vector<DependenceVector> > > D; - - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end(); j++) { - if (same_loop.find(i) != same_loop.end()) { - if (same_loop.find(j->first) != same_loop.end()) { - if (what_stmt_num.find(i) != what_stmt_num.end() - && what_stmt_num.find(j->first) - != what_stmt_num.end()) - dep.connect(what_stmt_num[i], - what_stmt_num[j->first], j->second); - if (place_after - && what_stmt_num.find(j->first) - != what_stmt_num.end()) { - std::vector<DependenceVector> dvs; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.is_data_dependence() && dep_dim != -1) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - dvs.push_back(dv); - } - if (dvs.size() > 0) - D.push_back( - std::make_pair(what_stmt_num[j->first], - dvs)); - } else if (!place_after - && what_stmt_num.find(i) - != what_stmt_num.end()) { - std::vector<DependenceVector> dvs; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.is_data_dependence() && dep_dim != -1) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - dvs.push_back(dv); - } - if (dvs.size() > 0) - dep.connect(what_stmt_num[i], j->first, dvs); - - } - } else { - if (what_stmt_num.find(i) != what_stmt_num.end()) - dep.connect(what_stmt_num[i], j->first, j->second); - } - } else if (same_loop.find(j->first) != same_loop.end()) { - if (what_stmt_num.find(j->first) != what_stmt_num.end()) - D.push_back( - std::make_pair(what_stmt_num[j->first], - j->second)); - } - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, D[j].first, D[j].second); - } - - } - - return result; -} - -void Loop::tile(int stmt_num, int level, int tile_size, int outer_level, - TilingMethodType method, int alignment_offset, int alignment_multiple) { - // check for sanity of parameters - if (tile_size < 0) - throw std::invalid_argument("invalid tile size"); - if (alignment_multiple < 1 || alignment_offset < 0) - throw std::invalid_argument("invalid alignment for tile"); - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - if (level <= 0) - throw std::invalid_argument("invalid loop level " + to_string(level)); - if (level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument( - "there is no loop level " + to_string(level) + " for statement " - + to_string(stmt_num)); - if (outer_level <= 0 || outer_level > level) - throw std::invalid_argument( - "invalid tile controlling loop level " - + to_string(outer_level)); - - int dim = 2 * level - 1; - int outer_dim = 2 * outer_level - 1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_tiled_loop = getStatements(lex, dim - 1); - std::set<int> same_tile_controlling_loop = getStatements(lex, - outer_dim - 1); - - for (int i = 0; i < stmt.size(); i++) { - std::vector<std::pair<int, DependenceVector> > D; - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); - j++) { - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - int dim2 = level - 1; - if ((dv.type != DEP_CONTROL) && (dv.type != DEP_UNKNOWN)) { - while (stmt[i].loop_level[dim2].type == LoopLevelTile) { - dim2 = stmt[i].loop_level[dim2].payload; - } - dim2 = stmt[i].loop_level[dim2].payload; - - if ((dv.hasNegative(dim2) && (!dv.quasi)) - || (dv.quasi && dv.hasPositive(dim2))) { - for (int l = outer_level; l < level; l++) - if (stmt[i].loop_level[l - 1].type - != LoopLevelTile) { - if (dv.isCarried( - stmt[i].loop_level[l - 1].payload)) - throw loop_error( - "loop error: Tiling is illegal, dependence violation!"); - } else { - - int dim3 = l - 1; - while (stmt[i].loop_level[l - 1].type - != LoopLevelTile) { - dim3 = stmt[i].loop_level[l - 1].payload; - - } - - dim3 = stmt[i].loop_level[l - 1].payload; - if (dim3 < level - 1) - if (dv.isCarried(dim3)) - throw loop_error( - "loop error: Tiling is illegal, dependence violation!"); - } - } - } - } - } - } - // special case for no tiling - if (tile_size == 0) { - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); - i != same_tile_controlling_loop.end(); i++) { - Relation r(stmt[*i].xform.n_out(), stmt[*i].xform.n_out() + 2); - F_And *f_root = r.add_and(); - for (int j = 1; j <= 2 * outer_level - 1; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j), -1); - } - EQ_Handle h1 = f_root->add_EQ(); - h1.update_coef(r.output_var(2 * outer_level), 1); - EQ_Handle h2 = f_root->add_EQ(); - h2.update_coef(r.output_var(2 * outer_level + 1), 1); - for (int j = 2 * outer_level; j <= stmt[*i].xform.n_out(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j + 2), -1); - } - - stmt[*i].xform = Composition(copy(r), stmt[*i].xform); - } - } - // normal tiling - else { - std::set<int> private_stmt; - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); - i != same_tile_controlling_loop.end(); i++) { -// if (same_tiled_loop.find(*i) == same_tiled_loop.end() && !is_single_iteration(getNewIS(*i), dim)) -// same_tiled_loop.insert(*i); - - // should test dim's value directly but it is ok for now -// if (same_tiled_loop.find(*i) == same_tiled_loop.end() && get_const(stmt[*i].xform, dim+1, Output_Var) == posInfinity) - if (same_tiled_loop.find(*i) == same_tiled_loop.end() - && overflow.find(*i) != overflow.end()) - private_stmt.insert(*i); - } - - // extract the union of the iteration space to be considered - Relation hull; - { - Tuple < Relation > r_list; - Tuple<int> r_mask; - - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); - i != same_tile_controlling_loop.end(); i++) - if (private_stmt.find(*i) == private_stmt.end()) { - Relation r = project_onto_levels(getNewIS(*i), dim + 1, - true); - for (int j = outer_dim; j < dim; j++) - r = Project(r, j + 1, Set_Var); - for (int j = 0; j < outer_dim; j += 2) - r = Project(r, j + 1, Set_Var); - r_list.append(r); - r_mask.append(1); - } - - hull = Hull(r_list, r_mask, 1, true); - } - - // extract the bound of the dimension to be tiled - Relation bound = get_loop_bound(hull, dim); - if (!bound.has_single_conjunct()) { - // further simplify the bound - hull = Approximate(hull); - bound = get_loop_bound(hull, dim); - - int i = outer_dim - 2; - while (!bound.has_single_conjunct() && i >= 0) { - hull = Project(hull, i + 1, Set_Var); - bound = get_loop_bound(hull, dim); - i -= 2; - } - - if (!bound.has_single_conjunct()) - throw loop_error("cannot handle tile bounds"); - } - - // separate lower and upper bounds - std::vector<GEQ_Handle> lb_list, ub_list; - { - Conjunct *c = bound.query_DNF()->single_conjunct(); - for (GEQ_Iterator gi(c->GEQs()); gi; gi++) { - int coef = (*gi).get_coef(bound.set_var(dim + 1)); - if (coef < 0) - ub_list.push_back(*gi); - else if (coef > 0) - lb_list.push_back(*gi); - } - } - if (lb_list.size() == 0) - throw loop_error( - "unable to calculate tile controlling loop lower bound"); - if (ub_list.size() == 0) - throw loop_error( - "unable to calculate tile controlling loop upper bound"); - - // find the simplest lower bound for StridedTile or simplest iteration count for CountedTile - int simplest_lb = 0, simplest_ub = 0; - if (method == StridedTile) { - int best_cost = INT_MAX; - for (int i = 0; i < lb_list.size(); i++) { - int cost = 0; - for (Constr_Vars_Iter ci(lb_list[i]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - cost += 5; - break; - } - case Global_Var: { - cost += 2; - break; - } - default: - cost += 15; - break; - } - } - - if (cost < best_cost) { - best_cost = cost; - simplest_lb = i; - } - } - } else if (method == CountedTile) { - std::map<Variable_ID, coef_t> s1, s2, s3; - int best_cost = INT_MAX; - for (int i = 0; i < lb_list.size(); i++) - for (int j = 0; j < ub_list.size(); j++) { - int cost = 0; - - for (Constr_Vars_Iter ci(lb_list[i]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - s1[(*ci).var] += (*ci).coef; - break; - } - case Global_Var: { - s2[(*ci).var] += (*ci).coef; - break; - } - case Exists_Var: - case Wildcard_Var: { - s3[(*ci).var] += (*ci).coef; - break; - } - default: - cost = INT_MAX - 2; - break; - } - } - - for (Constr_Vars_Iter ci(ub_list[j]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - s1[(*ci).var] += (*ci).coef; - break; - } - case Global_Var: { - s2[(*ci).var] += (*ci).coef; - break; - } - case Exists_Var: - case Wildcard_Var: { - s3[(*ci).var] += (*ci).coef; - break; - } - default: - if (cost == INT_MAX - 2) - cost = INT_MAX - 1; - else - cost = INT_MAX - 3; - break; - } - } - - if (cost == 0) { - for (std::map<Variable_ID, coef_t>::iterator k = - s1.begin(); k != s1.end(); k++) - if ((*k).second != 0) - cost += 5; - for (std::map<Variable_ID, coef_t>::iterator k = - s2.begin(); k != s2.end(); k++) - if ((*k).second != 0) - cost += 2; - for (std::map<Variable_ID, coef_t>::iterator k = - s3.begin(); k != s3.end(); k++) - if ((*k).second != 0) - cost += 15; - } - - if (cost < best_cost) { - best_cost = cost; - simplest_lb = i; - simplest_ub = j; - } - } - } - - // prepare the new transformation relations - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); - i != same_tile_controlling_loop.end(); i++) { - Relation r(stmt[*i].xform.n_out(), stmt[*i].xform.n_out() + 2); - F_And *f_root = r.add_and(); - for (int j = 0; j < outer_dim - 1; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(j + 1), 1); - h.update_coef(r.input_var(j + 1), -1); - } - - for (int j = outer_dim - 1; j < stmt[*i].xform.n_out(); j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(j + 3), 1); - h.update_coef(r.input_var(j + 1), -1); - } - - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(outer_dim), 1); - h.update_const(-lex[outer_dim - 1]); - - stmt[*i].xform = Composition(r, stmt[*i].xform); - } - - // add tiling constraints. - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); - i != same_tile_controlling_loop.end(); i++) { - F_And *f_super_root = stmt[*i].xform.and_with_and(); - F_Exists *f_exists = f_super_root->add_exists(); - F_And *f_root = f_exists->add_and(); - - // create a lower bound variable for easy formula creation later - Variable_ID aligned_lb; - { - Variable_ID lb = f_exists->declare(); - coef_t coef = lb_list[simplest_lb].get_coef( - bound.set_var(dim + 1)); - if (coef == 1) { // e.g. if i >= m+5, then LB = m+5 - EQ_Handle h = f_root->add_EQ(); - h.update_coef(lb, 1); - for (Constr_Vars_Iter ci(lb_list[simplest_lb]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos != dim + 1) - h.update_coef(stmt[*i].xform.output_var(pos), - (*ci).coef); - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, - (*ci).var->function_of()); - h.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h.update_const(lb_list[simplest_lb].get_const()); - } else { // e.g. if 2i >= m+5, then m+5 <= 2*LB < m+5+2 - GEQ_Handle h1 = f_root->add_GEQ(); - GEQ_Handle h2 = f_root->add_GEQ(); - for (Constr_Vars_Iter ci(lb_list[simplest_lb]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos == dim + 1) { - h1.update_coef(lb, (*ci).coef); - h2.update_coef(lb, -(*ci).coef); - } else { - h1.update_coef(stmt[*i].xform.output_var(pos), - (*ci).coef); - h2.update_coef(stmt[*i].xform.output_var(pos), - -(*ci).coef); - } - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, - (*ci).var->function_of()); - h1.update_coef(v, (*ci).coef); - h2.update_coef(v, -(*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h1.update_const(lb_list[simplest_lb].get_const()); - h2.update_const(-lb_list[simplest_lb].get_const()); - h2.update_const(coef - 1); - } - - Variable_ID offset_lb; - if (alignment_offset == 0) - offset_lb = lb; - else { - EQ_Handle h = f_root->add_EQ(); - offset_lb = f_exists->declare(); - h.update_coef(offset_lb, 1); - h.update_coef(lb, -1); - h.update_const(alignment_offset); - } - - if (alignment_multiple == 1) { // trivial - aligned_lb = offset_lb; - } else { // e.g. to align at 4, aligned_lb = 4*alpha && LB-4 < 4*alpha <= LB - aligned_lb = f_exists->declare(); - Variable_ID e = f_exists->declare(); - - EQ_Handle h = f_root->add_EQ(); - h.update_coef(aligned_lb, 1); - h.update_coef(e, -alignment_multiple); - - GEQ_Handle h1 = f_root->add_GEQ(); - GEQ_Handle h2 = f_root->add_GEQ(); - h1.update_coef(e, alignment_multiple); - h2.update_coef(e, -alignment_multiple); - h1.update_coef(offset_lb, -1); - h2.update_coef(offset_lb, 1); - h1.update_const(alignment_multiple - 1); - } - } - - // create an upper bound variable for easy formula creation later - Variable_ID ub = f_exists->declare(); - { - coef_t coef = -ub_list[simplest_ub].get_coef( - bound.set_var(dim + 1)); - if (coef == 1) { // e.g. if i <= m+5, then UB = m+5 - EQ_Handle h = f_root->add_EQ(); - h.update_coef(ub, -1); - for (Constr_Vars_Iter ci(ub_list[simplest_ub]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos != dim + 1) - h.update_coef(stmt[*i].xform.output_var(pos), - (*ci).coef); - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, - (*ci).var->function_of()); - h.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h.update_const(ub_list[simplest_ub].get_const()); - } else { // e.g. if 2i <= m+5, then m+5-2 < 2*UB <= m+5 - GEQ_Handle h1 = f_root->add_GEQ(); - GEQ_Handle h2 = f_root->add_GEQ(); - for (Constr_Vars_Iter ci(ub_list[simplest_ub]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - int pos = (*ci).var->get_position(); - if (pos == dim + 1) { - h1.update_coef(ub, -(*ci).coef); - h2.update_coef(ub, (*ci).coef); - } else { - h1.update_coef(stmt[*i].xform.output_var(pos), - -(*ci).coef); - h2.update_coef(stmt[*i].xform.output_var(pos), - (*ci).coef); - } - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = stmt[*i].xform.get_local(g); - else - v = stmt[*i].xform.get_local(g, - (*ci).var->function_of()); - h1.update_coef(v, -(*ci).coef); - h2.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot handle tile bounds"); - } - } - h1.update_const(-ub_list[simplest_ub].get_const()); - h2.update_const(ub_list[simplest_ub].get_const()); - h1.update_const(coef - 1); - } - } - - // insert tile controlling loop constraints - if (method == StridedTile) { // e.g. ii = LB + 32 * alpha && alpha >= 0 - Variable_ID e = f_exists->declare(); - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(e, 1); - - EQ_Handle h2 = f_root->add_EQ(); - h2.update_coef(stmt[*i].xform.output_var(outer_dim + 1), 1); - h2.update_coef(e, -tile_size); - h2.update_coef(aligned_lb, -1); - } else if (method == CountedTile) { // e.g. 0 <= ii < ceiling((UB-LB+1)/32) - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(stmt[*i].xform.output_var(outer_dim + 1), 1); - - GEQ_Handle h2 = f_root->add_GEQ(); - h2.update_coef(stmt[*i].xform.output_var(outer_dim + 1), - -tile_size); - h2.update_coef(aligned_lb, -1); - h2.update_coef(ub, 1); - } - - // special care for private statements like overflow assignment - if (private_stmt.find(*i) != private_stmt.end()) { // e.g. ii <= UB - GEQ_Handle h = f_root->add_GEQ(); - h.update_coef(stmt[*i].xform.output_var(outer_dim + 1), -1); - h.update_coef(ub, 1); - } - // if (private_stmt.find(*i) != private_stmt.end()) { - // if (stmt[*i].xform.n_out() > dim+3) { // e.g. ii <= UB && i = ii - // GEQ_Handle h = f_root->add_GEQ(); - // h.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - // h.update_coef(ub, 1); - - // stmt[*i].xform = Project(stmt[*i].xform, dim+3, Output_Var); - // f_root = stmt[*i].xform.and_with_and(); - // EQ_Handle h1 = f_root->add_EQ(); - // h1.update_coef(stmt[*i].xform.output_var(dim+3), 1); - // h1.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - // } - // else if (method == StridedTile) { // e.g. ii <= UB since i does not exist - // GEQ_Handle h = f_root->add_GEQ(); - // h.update_coef(stmt[*i].xform.output_var(outer_dim+1), -1); - // h.update_coef(ub, 1); - // } - // } - - // restrict original loop index inside the tile - else { - if (method == StridedTile) { // e.g. ii <= i < ii + tile_size - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(stmt[*i].xform.output_var(dim + 3), 1); - h1.update_coef(stmt[*i].xform.output_var(outer_dim + 1), - -1); - - GEQ_Handle h2 = f_root->add_GEQ(); - h2.update_coef(stmt[*i].xform.output_var(dim + 3), -1); - h2.update_coef(stmt[*i].xform.output_var(outer_dim + 1), 1); - h2.update_const(tile_size - 1); - } else if (method == CountedTile) { // e.g. LB+32*ii <= i < LB+32*ii+tile_size - GEQ_Handle h1 = f_root->add_GEQ(); - h1.update_coef(stmt[*i].xform.output_var(outer_dim + 1), - -tile_size); - h1.update_coef(stmt[*i].xform.output_var(dim + 3), 1); - h1.update_coef(aligned_lb, -1); - - GEQ_Handle h2 = f_root->add_GEQ(); - h2.update_coef(stmt[*i].xform.output_var(outer_dim + 1), - tile_size); - h2.update_coef(stmt[*i].xform.output_var(dim + 3), -1); - h2.update_const(tile_size - 1); - h2.update_coef(aligned_lb, 1); - } - } - } - } - - // update loop level information - for (std::set<int>::iterator i = same_tile_controlling_loop.begin(); - i != same_tile_controlling_loop.end(); i++) { - for (int j = 1; j <= stmt[*i].loop_level.size(); j++) - switch (stmt[*i].loop_level[j - 1].type) { - case LoopLevelOriginal: - break; - case LoopLevelTile: - if (stmt[*i].loop_level[j - 1].payload >= outer_level) - stmt[*i].loop_level[j - 1].payload++; - break; - default: - throw loop_error( - "unknown loop level type for statement " - + to_string(*i)); - } - - LoopLevel ll; - ll.type = LoopLevelTile; - ll.payload = level + 1; - ll.parallel_level = 0; - stmt[*i].loop_level.insert( - stmt[*i].loop_level.begin() + (outer_level - 1), ll); - } -} - -std::set<int> Loop::unroll(int stmt_num, int level, int unroll_amount) { - // check for sanity of parameters - if (unroll_amount < 0) - throw std::invalid_argument( - "invalid unroll amount " + to_string(unroll_amount)); - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - int dim = 2 * level - 1; - std::vector<int> lex = getLexicalOrder(stmt_num); - std::set<int> same_loop = getStatements(lex, dim - 1); - - // nothing to do - if (unroll_amount == 1) - return std::set<int>(); - - for (int i = 0; i < stmt.size(); i++) { - std::vector<std::pair<int, DependenceVector> > D; - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); - j++) { - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - int dim2 = level - 1; - if ((dv.type != DEP_CONTROL) && (dv.type != DEP_UNKNOWN)) { - - while (stmt[i].loop_level[dim2].type == LoopLevelTile) { - dim2 = xform_index[dim2].first; - } - dim2 = stmt[i].loop_level[dim2].payload; - - if (dv.isCarried(dim2) - && (dv.hasNegative(dim2) && !dv.quasi)) - throw loop_error( - "loop error: Unrolling is illegal, dependence violation!"); - - if (dv.isCarried(dim2) - && (dv.hasPositive(dim2) && dv.quasi)) - throw loop_error( - "loop error: Unrolling is illegal, dependence violation!"); - bool safe = false; - - if (dv.isCarried(dim2)) { - - if (!dv.quasi) { - if (dv.lbounds[dim2] != posInfinity) { - if (dv.lbounds[dim2] != negInfinity) - if (dv.lbounds[dim2] > unroll_amount) - safe = true; - } else - safe = true; - } else { - if (dv.ubounds[dim2] != negInfinity) { - if (dv.ubounds[dim2] != posInfinity) - if ((-(dv.ubounds[dim2])) > unroll_amount) - safe = true; - } else - safe = true; - } - - if (!safe) { - for (int l = level; l <= (n - 1) / 2; l++) { - int dim3 = l - 1; - - if (stmt[i].loop_level[dim3].type - != LoopLevelTile) - dim3 = stmt[i].loop_level[dim3].payload; - else { - while (stmt[i].loop_level[dim2].type - == LoopLevelTile) { - dim3 = stmt[i].loop_level[dim3].payload; - } - dim3 = stmt[i].loop_level[dim3].payload; - } - - if (dim3 > dim2) { - if ((dv.hasPositive(dim3) && !dv.quasi) - || (dv.hasNegative(dim3) && dv.quasi)) - break; - else if ((dv.hasNegative(dim3) && !dv.quasi) - || (dv.hasPositive(dim3) && dv.quasi)) - throw loop_error( - "loop error: Unrolling is illegal, dependence violation!"); - } - } - } - } - } - } - } - } - - // extract the intersection of the iteration space to be considered - Relation hull = Relation::True(level); - apply_xform(same_loop); - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); - i++) { - if (stmt[*i].IS.is_upper_bound_satisfiable()) { - Relation mapping(stmt[*i].IS.n_set(), level); - F_And *f_root = mapping.add_and(); - for (int j = 1; j <= level; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.input_var(j), 1); - h.update_coef(mapping.output_var(j), -1); - } - hull = Intersection(hull, - Range(Restrict_Domain(mapping, copy(stmt[*i].IS)))); - hull.simplify(2, 4); - } - } - for (int i = 1; i <= level; i++) { - std::string name = tmp_loop_var_name_prefix + to_string(i); - hull.name_set_var(i, name); - } - hull.setup_names(); - - // extract the exact loop bound of the dimension to be unrolled - if (is_single_loop_iteration(hull, level, this->known)) - return std::set<int>(); - Relation bound = get_loop_bound(hull, level, this->known); - if (!bound.has_single_conjunct() || !bound.is_satisfiable() - || bound.is_tautology()) - throw loop_error("unable to extract loop bound for unrolling"); - - // extract the loop stride - EQ_Handle stride_eq; - int stride = 1; - { - bool simple_stride = true; - int strides = countStrides(bound.query_DNF()->single_conjunct(), - bound.set_var(level), stride_eq, simple_stride); - if (strides > 1) - throw loop_error("too many strides"); - else if (strides == 1) { - int sign = stride_eq.get_coef(bound.set_var(level)); - Constr_Vars_Iter it(stride_eq, true); - stride = abs((*it).coef / sign); - } - } - - // separate lower and upper bounds - std::vector<GEQ_Handle> lb_list, ub_list; - { - Conjunct *c = bound.query_DNF()->single_conjunct(); - for (GEQ_Iterator gi(c->GEQs()); gi; gi++) { - int coef = (*gi).get_coef(bound.set_var(level)); - if (coef < 0) - ub_list.push_back(*gi); - else if (coef > 0) - lb_list.push_back(*gi); - } - } - - // simplify overflow expression for each pair of upper and lower bounds - std::vector<std::vector<std::map<Variable_ID, int> > > overflow_table( - lb_list.size(), - std::vector<std::map<Variable_ID, int> >(ub_list.size(), - std::map<Variable_ID, int>())); - bool is_overflow_simplifiable = true; - for (int i = 0; i < lb_list.size(); i++) { - if (!is_overflow_simplifiable) - break; - - for (int j = 0; j < ub_list.size(); j++) { - // lower bound or upper bound has non-unit coefficient, can't simplify - if (ub_list[j].get_coef(bound.set_var(level)) != -1 - || lb_list[i].get_coef(bound.set_var(level)) != 1) { - is_overflow_simplifiable = false; - break; - } - - for (Constr_Vars_Iter ci(ub_list[j]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - if ((*ci).var != bound.set_var(level)) - overflow_table[i][j][(*ci).var] += (*ci).coef; - - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = bound.get_local(g); - else - v = bound.get_local(g, (*ci).var->function_of()); - overflow_table[i][j][(*ci).var] += (*ci).coef; - break; - } - default: - throw loop_error("failed to calculate overflow amount"); - } - } - overflow_table[i][j][NULL] += ub_list[j].get_const(); - - for (Constr_Vars_Iter ci(lb_list[i]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: { - if ((*ci).var != bound.set_var(level)) { - overflow_table[i][j][(*ci).var] += (*ci).coef; - if (overflow_table[i][j][(*ci).var] == 0) - overflow_table[i][j].erase( - overflow_table[i][j].find((*ci).var)); - } - break; - } - case Global_Var: { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = bound.get_local(g); - else - v = bound.get_local(g, (*ci).var->function_of()); - overflow_table[i][j][(*ci).var] += (*ci).coef; - if (overflow_table[i][j][(*ci).var] == 0) - overflow_table[i][j].erase( - overflow_table[i][j].find((*ci).var)); - break; - } - default: - throw loop_error("failed to calculate overflow amount"); - } - } - overflow_table[i][j][NULL] += lb_list[i].get_const(); - - overflow_table[i][j][NULL] += stride; - if (unroll_amount == 0 - || (overflow_table[i][j].size() == 1 - && overflow_table[i][j][NULL] / stride - < unroll_amount)) - unroll_amount = overflow_table[i][j][NULL] / stride; - } - } - - // loop iteration count can't be determined, bail out gracefully - if (unroll_amount == 0) - return std::set<int>(); - - // further simply overflow calculation using coefficients' modular - if (is_overflow_simplifiable) { - for (int i = 0; i < lb_list.size(); i++) - for (int j = 0; j < ub_list.size(); j++) - if (stride == 1) { - for (std::map<Variable_ID, int>::iterator k = - overflow_table[i][j].begin(); - k != overflow_table[i][j].end();) - if ((*k).first != NULL) { - int t = int_mod_hat((*k).second, unroll_amount); - if (t == 0) { - overflow_table[i][j].erase(k++); - } else { - int t2 = hull.query_variable_mod((*k).first, - unroll_amount); - if (t2 != INT_MAX) { - overflow_table[i][j][NULL] += t * t2; - overflow_table[i][j].erase(k++); - } else { - (*k).second = t; - k++; - } - } - } else - k++; - - overflow_table[i][j][NULL] = int_mod_hat( - overflow_table[i][j][NULL], unroll_amount); - - // Since we don't have MODULO instruction in SUIF yet (only MOD), make all coef positive in the final formula - for (std::map<Variable_ID, int>::iterator k = - overflow_table[i][j].begin(); - k != overflow_table[i][j].end(); k++) - if ((*k).second < 0) - (*k).second += unroll_amount; - } - } - - // build overflow statement - CG_outputBuilder *ocg = ir->builder(); - CG_outputRepr *overflow_code = NULL; - Relation cond_upper(level), cond_lower(level); - Relation overflow_constraint(0); - F_And *overflow_constraint_root = overflow_constraint.add_and(); - std::vector<Free_Var_Decl *> over_var_list; - if (is_overflow_simplifiable && lb_list.size() == 1) { - for (int i = 0; i < ub_list.size(); i++) { - if (overflow_table[0][i].size() == 1) { - // upper splitting condition - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[i]); - h.update_const( - ((overflow_table[0][i][NULL] / stride) % unroll_amount) - * -stride); - } else { - // upper splitting condition - std::string over_name = overflow_var_name_prefix - + to_string(overflow_var_name_counter++); - Free_Var_Decl *over_free_var = new Free_Var_Decl(over_name); - over_var_list.push_back(over_free_var); - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[i]); - h.update_coef(cond_upper.get_local(over_free_var), -stride); - - // insert constraint 0 <= overflow < unroll_amount - Variable_ID v = overflow_constraint.get_local(over_free_var); - GEQ_Handle h1 = overflow_constraint_root->add_GEQ(); - h1.update_coef(v, 1); - GEQ_Handle h2 = overflow_constraint_root->add_GEQ(); - h2.update_coef(v, -1); - h2.update_const(unroll_amount - 1); - - // create overflow assignment - bound.setup_names(); - CG_outputRepr *rhs = NULL; - for (std::map<Variable_ID, int>::iterator j = - overflow_table[0][i].begin(); - j != overflow_table[0][i].end(); j++) - if ((*j).first != NULL) { - CG_outputRepr *t = ocg->CreateIdent((*j).first->name()); - if ((*j).second != 1) - t = ocg->CreateTimes(ocg->CreateInt((*j).second), - t); - rhs = ocg->CreatePlus(rhs, t); - } else if ((*j).second != 0) - rhs = ocg->CreatePlus(rhs, ocg->CreateInt((*j).second)); - - if (stride != 1) - rhs = ocg->CreateIntegerCeil(rhs, ocg->CreateInt(stride)); - rhs = ocg->CreateIntegerMod(rhs, ocg->CreateInt(unroll_amount)); - - CG_outputRepr *lhs = ocg->CreateIdent(over_name); - init_code = ocg->StmtListAppend(init_code, - ocg->CreateAssignment(0, lhs, ocg->CreateInt(0))); - lhs = ocg->CreateIdent(over_name); - overflow_code = ocg->StmtListAppend(overflow_code, - ocg->CreateAssignment(0, lhs, rhs)); - } - } - - // lower splitting condition - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[0]); - } else if (is_overflow_simplifiable && ub_list.size() == 1) { - for (int i = 0; i < lb_list.size(); i++) { - - if (overflow_table[i][0].size() == 1) { - // lower splitting condition - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[i]); - h.update_const(overflow_table[i][0][NULL] * -stride); - } else { - // lower splitting condition - std::string over_name = overflow_var_name_prefix - + to_string(overflow_var_name_counter++); - Free_Var_Decl *over_free_var = new Free_Var_Decl(over_name); - over_var_list.push_back(over_free_var); - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[i]); - h.update_coef(cond_lower.get_local(over_free_var), -stride); - - // insert constraint 0 <= overflow < unroll_amount - Variable_ID v = overflow_constraint.get_local(over_free_var); - GEQ_Handle h1 = overflow_constraint_root->add_GEQ(); - h1.update_coef(v, 1); - GEQ_Handle h2 = overflow_constraint_root->add_GEQ(); - h2.update_coef(v, -1); - h2.update_const(unroll_amount - 1); - - // create overflow assignment - bound.setup_names(); - CG_outputRepr *rhs = NULL; - for (std::map<Variable_ID, int>::iterator j = - overflow_table[0][i].begin(); - j != overflow_table[0][i].end(); j++) - if ((*j).first != NULL) { - CG_outputRepr *t = ocg->CreateIdent((*j).first->name()); - if ((*j).second != 1) - t = ocg->CreateTimes(ocg->CreateInt((*j).second), - t); - rhs = ocg->CreatePlus(rhs, t); - } else if ((*j).second != 0) - rhs = ocg->CreatePlus(rhs, ocg->CreateInt((*j).second)); - - if (stride != 1) - rhs = ocg->CreateIntegerCeil(rhs, ocg->CreateInt(stride)); - rhs = ocg->CreateIntegerMod(rhs, ocg->CreateInt(unroll_amount)); - - CG_outputRepr *lhs = ocg->CreateIdent(over_name); - init_code = ocg->StmtListAppend(init_code, - ocg->CreateAssignment(0, lhs, ocg->CreateInt(0))); - lhs = ocg->CreateIdent(over_name); - overflow_code = ocg->StmtListAppend(overflow_code, - ocg->CreateAssignment(0, lhs, rhs)); - } - } - - // upper splitting condition - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[0]); - } else { - std::string over_name = overflow_var_name_prefix - + to_string(overflow_var_name_counter++); - Free_Var_Decl *over_free_var = new Free_Var_Decl(over_name); - over_var_list.push_back(over_free_var); - - Tuple<CG_outputRepr *> lb_repr_list, ub_repr_list; - for (int i = 0; i < lb_list.size(); i++) { - //lb_repr_list.append(outputLBasRepr(ocg, lb_list[i], bound, bound.set_var(dim+1), stride, stride_eq, Relation::True(bound.n_set()), std::vector<CG_outputRepr *>(bound.n_set(), NULL))); - lb_repr_list.append( - outputLBasRepr(ocg, lb_list[i], bound, - bound.set_var(dim + 1), stride, stride_eq, - Relation::True(bound.n_set()), - std::vector<CG_outputRepr *>(bound.n_set()))); - GEQ_Handle h = cond_lower.and_with_GEQ(lb_list[i]); - } - for (int i = 0; i < ub_list.size(); i++) { - //ub_repr_list.append(outputUBasRepr(ocg, ub_list[i], bound, bound.set_var(dim+1), stride, stride_eq, std::vector<CG_outputRepr *>(bound.n_set(), NULL))); - ub_repr_list.append( - outputUBasRepr(ocg, ub_list[i], bound, - bound.set_var(dim + 1), stride, stride_eq, - std::vector<CG_outputRepr *>(bound.n_set()))); - GEQ_Handle h = cond_upper.and_with_GEQ(ub_list[i]); - h.update_coef(cond_upper.get_local(over_free_var), -stride); - } - - CG_outputRepr *lbRepr, *ubRepr; - if (lb_repr_list.size() > 1) - lbRepr = ocg->CreateInvoke("max", lb_repr_list); - else if (lb_repr_list.size() == 1) - lbRepr = lb_repr_list[1]; - - if (ub_repr_list.size() > 1) - ubRepr = ocg->CreateInvoke("min", ub_repr_list); - else if (ub_repr_list.size() == 1) - ubRepr = ub_repr_list[1]; - - // create overflow assignment - bound.setup_names(); - CG_outputRepr *rhs = ocg->CreatePlus(ocg->CreateMinus(ubRepr, lbRepr), - ocg->CreateInt(1)); - if (stride != 1) - rhs = ocg->CreateIntegerDivide(rhs, ocg->CreateInt(stride)); - rhs = ocg->CreateIntegerMod(rhs, ocg->CreateInt(unroll_amount)); - CG_outputRepr *lhs = ocg->CreateIdent(over_name); - init_code = ocg->StmtListAppend(init_code, - ocg->CreateAssignment(0, lhs, ocg->CreateInt(0))); - lhs = ocg->CreateIdent(over_name); - overflow_code = ocg->CreateAssignment(0, lhs, rhs); - - // insert constraint 0 <= overflow < unroll_amount - Variable_ID v = overflow_constraint.get_local(over_free_var); - GEQ_Handle h1 = overflow_constraint_root->add_GEQ(); - h1.update_coef(v, 1); - GEQ_Handle h2 = overflow_constraint_root->add_GEQ(); - h2.update_coef(v, -1); - h2.update_const(unroll_amount - 1); - } - - // insert overflow statement - int overflow_stmt_num = -1; - if (overflow_code != NULL) { - // build iteration space for overflow statement - Relation mapping(level, level - 1); - F_And *f_root = mapping.add_and(); - for (int i = 1; i < level; i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(i), 1); - h.update_coef(mapping.input_var(i), -1); - } - Relation overflow_IS = Range(Restrict_Domain(mapping, copy(hull))); - for (int i = 1; i < level; i++) - overflow_IS.name_set_var(i, hull.set_var(i)->name()); - overflow_IS.setup_names(); - - // build dumb transformation relation for overflow statement - Relation overflow_xform(level - 1, 2 * (level - 1) + 1); - f_root = overflow_xform.add_and(); - for (int i = 1; i <= level - 1; i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(overflow_xform.output_var(2 * i), 1); - h.update_coef(overflow_xform.input_var(i), -1); - - h = f_root->add_EQ(); - h.update_coef(overflow_xform.output_var(2 * i - 1), 1); - h.update_const(-lex[2 * i - 2]); - } - EQ_Handle h = f_root->add_EQ(); - h.update_coef(overflow_xform.output_var(2 * (level - 1) + 1), 1); - h.update_const(-lex[2 * (level - 1)]); - - shiftLexicalOrder(lex, dim - 1, 1); - Statement overflow_stmt; - overflow_stmt.code = overflow_code; - overflow_stmt.IS = overflow_IS; - overflow_stmt.xform = overflow_xform; - overflow_stmt.loop_level = std::vector<LoopLevel>(level - 1); - for (int i = 0; i < level - 1; i++) { - overflow_stmt.loop_level[i].type = - stmt[stmt_num].loop_level[i].type; - if (stmt[stmt_num].loop_level[i].type == LoopLevelTile - && stmt[stmt_num].loop_level[i].payload >= level) - overflow_stmt.loop_level[i].payload = -1; - else - overflow_stmt.loop_level[i].payload = - stmt[stmt_num].loop_level[i].payload; - overflow_stmt.loop_level[i].parallel_level = - stmt[stmt_num].loop_level[i].parallel_level; - } - stmt.push_back(overflow_stmt); - dep.insert(); - overflow_stmt_num = stmt.size() - 1; - overflow[overflow_stmt_num] = over_var_list; - - // update the global known information on overflow variable - this->known = Intersection(this->known, - Extend_Set(copy(overflow_constraint), - this->known.n_set() - overflow_constraint.n_set())); - - // update dependence graph - DependenceVector dv; - dv.type = DEP_CONTROL; - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) - dep.connect(overflow_stmt_num, *i, dv); - dv.type = DEP_W2W; - { - IR_ScalarSymbol *overflow_sym = NULL; - std::vector<IR_ScalarRef *> scalars = ir->FindScalarRef( - overflow_code); - for (int i = scalars.size() - 1; i >= 0; i--) - if (scalars[i]->is_write()) { - overflow_sym = scalars[i]->symbol(); - break; - } - for (int i = scalars.size() - 1; i >= 0; i--) - delete scalars[i]; - dv.sym = overflow_sym; - } - dv.lbounds = std::vector<coef_t>(num_dep_dim, 0); - dv.ubounds = std::vector<coef_t>(num_dep_dim, 0); - int dep_dim = get_last_dep_dim_before(stmt_num, level); - for (int i = dep_dim + 1; i < num_dep_dim; i++) { - dv.lbounds[i] = -posInfinity; - dv.ubounds[i] = posInfinity; - } - for (int i = 0; i <= dep_dim; i++) { - if (i != 0) { - dv.lbounds[i - 1] = 0; - dv.ubounds[i - 1] = 0; - } - dv.lbounds[i] = 1; - dv.ubounds[i] = posInfinity; - dep.connect(overflow_stmt_num, overflow_stmt_num, dv); - } - } - - // split the loop so it can be fully unrolled - std::set<int> result = split(stmt_num, level, cond_upper); - std::set<int> result2 = split(stmt_num, level, cond_lower); - for (std::set<int>::iterator i = result2.begin(); i != result2.end(); i++) - result.insert(*i); - - // check if unrolled statements can be trivially lumped together as one statement - bool can_be_lumped = true; - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) - if (*i != stmt_num) { - if (stmt[*i].loop_level.size() - != stmt[stmt_num].loop_level.size()) { - can_be_lumped = false; - break; - } - for (int j = 0; j < stmt[stmt_num].loop_level.size(); j++) - if (!(stmt[*i].loop_level[j].type - == stmt[stmt_num].loop_level[j].type - && stmt[*i].loop_level[j].payload - == stmt[stmt_num].loop_level[j].payload)) { - can_be_lumped = false; - break; - } - if (!can_be_lumped) - break; - std::vector<int> lex2 = getLexicalOrder(*i); - for (int j = 2 * level; j < lex.size() - 1; j += 2) - if (lex[j] != lex2[j]) { - can_be_lumped = false; - break; - } - if (!can_be_lumped) - break; - } - } - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) - if (is_inner_loop_depend_on_level(stmt[*i].IS, level, known)) { - can_be_lumped = false; - break; - } - } - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) - if (*i != stmt_num) { - if (!(Must_Be_Subset(copy(stmt[*i].IS), copy(stmt[stmt_num].IS)) - && Must_Be_Subset(copy(stmt[stmt_num].IS), - copy(stmt[*i].IS)))) { - can_be_lumped = false; - break; - } - } - } - if (can_be_lumped) { - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) { - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[*i].second.begin(); - j != dep.vertex[*i].second.end(); j++) - if (same_loop.find(j->first) != same_loop.end()) { - for (int k = 0; k < j->second.size(); k++) - if (j->second[k].type == DEP_CONTROL - || j->second[k].type == DEP_UNKNOWN) { - can_be_lumped = false; - break; - } - if (!can_be_lumped) - break; - } - if (!can_be_lumped) - break; - } - } - - // add strides to original statements - // for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) - // add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - - // std::vector<Free_Var_Decl *> depending_overflow_var; - // for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - // add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - // if (overflow.find(*i) != overflow.end()) { - // // TO DO: It should check whether overflow vaiable depends on - // // this loop index and by how much. This step is important if - // // you want to unroll loops in arbitrary order. - // depending_overflow_var.insert(depending_overflow_var.end(), overflow[*i].begin(), overflow[*i].end()); - - // continue; - // } - // } - -// std::map<int, std::vector<Statement> > pending; -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// add_loop_stride(stmt[*i].IS, bound, level-1, unroll_amount * stride); - -// if (overflow.find(*i) != overflow.end()) { -// // TO DO: It should check whether overflow vaiable depends on -// // this loop index and by how much. This step is important if -// // you want to unroll loops in arbitrary order. -// depending_overflow_var.insert(depending_overflow_var.end(), overflow[*i].begin(), overflow[*i].end()); - -// continue; -// } - -// // create copy for each unroll amount -// for (int j = 1; j < unroll_amount; j++) { -// Tuple<CG_outputRepr *> funcList; -// Tuple<std::string> loop_vars; -// loop_vars.append(stmt[*i].IS.set_var((dim+1)/2)->name()); -// funcList.append(ocg->CreatePlus(ocg->CreateIdent(stmt[*i].IS.set_var(level)->name()), ocg->CreateInt(j*stride))); -// CG_outputRepr *code = ocg->CreatePlaceHolder(0, stmt[*i].code->clone(), funcList, loop_vars); - -// // prepare the new statment to insert -// Statement unrolled_stmt; -// unrolled_stmt.IS = copy(stmt[*i].IS); -// // adjust_loop_bound(unrolled_stmt.IS, (dim-1)/2, j); -// unrolled_stmt.xform = copy(stmt[*i].xform); -// unrolled_stmt.code = code; -// unrolled_stmt.loop_level = stmt[*i].loop_level; -// pending[*i].push_back(unrolled_stmt); -// } -// } - -// // adjust iteration space due to loop bounds depending on this loop -// // index and affected overflow variables -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// for (int j = 0; j < pending[*i].size(); j++) { -// adjust_loop_bound(pending[*i][j].IS, (dim-1)/2, j+1, depending_overflow_var); -// //pending[*i][j].IS = Intersection(pending[*i][j].IS, Extend_Set(copy(this->known), pending[*i][j].IS.n_set() - this->known.n_set())); -// } -// } - - // insert unrolled statements - int old_num_stmt = stmt.size(); - if (!can_be_lumped) { - std::map<int, std::vector<int> > what_stmt_num; - - for (int j = 1; j < unroll_amount; j++) { - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) { - Statement new_stmt; - - Tuple<CG_outputRepr *> funcList; - Tuple<std::string> loop_vars; - loop_vars.append(stmt[*i].IS.set_var(level)->name()); - funcList.append( - ocg->CreatePlus( - ocg->CreateIdent( - stmt[*i].IS.set_var(level)->name()), - ocg->CreateInt(j * stride))); - new_stmt.code = ocg->CreatePlaceHolder(0, - stmt[*i].code->clone(), funcList, loop_vars); - - new_stmt.IS = adjust_loop_bound(stmt[*i].IS, level, j * stride); - add_loop_stride(new_stmt.IS, bound, level - 1, - unroll_amount * stride); - - new_stmt.xform = copy(stmt[*i].xform); - new_stmt.loop_level = stmt[*i].loop_level; - stmt.push_back(new_stmt); - dep.insert(); - what_stmt_num[*i].push_back(stmt.size() - 1); - } - } - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) - add_loop_stride(stmt[*i].IS, bound, level - 1, - unroll_amount * stride); - - // update dependence graph - if (stmt[stmt_num].loop_level[level - 1].type == LoopLevelOriginal) { - int dep_dim = stmt[stmt_num].loop_level[level - 1].payload; - int new_stride = unroll_amount * stride; - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::pair<int, DependenceVector> > D; - - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end();) { - if (same_loop.find(i) != same_loop.end()) { - if (same_loop.find(j->first) != same_loop.end()) { - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.type == DEP_CONTROL - || dv.type == DEP_UNKNOWN) { - D.push_back(std::make_pair(j->first, dv)); - for (int kk = 0; kk < unroll_amount - 1; - kk++) - if (what_stmt_num[i][kk] != -1 - && what_stmt_num[j->first][kk] - != -1) - dep.connect(what_stmt_num[i][kk], - what_stmt_num[j->first][kk], - dv); - } else { - coef_t lb = dv.lbounds[dep_dim]; - coef_t ub = dv.ubounds[dep_dim]; - if (ub == lb - && int_mod(lb, - static_cast<coef_t>(new_stride)) - == 0) { - D.push_back( - std::make_pair(j->first, dv)); - for (int kk = 0; kk < unroll_amount - 1; - kk++) - if (what_stmt_num[i][kk] != -1 - && what_stmt_num[j->first][kk] - != -1) - dep.connect( - what_stmt_num[i][kk], - what_stmt_num[j->first][kk], - dv); - } else if (lb == -posInfinity - && ub == posInfinity) { - D.push_back( - std::make_pair(j->first, dv)); - for (int kk = 0; kk < unroll_amount; - kk++) - if (kk == 0) - D.push_back( - std::make_pair(j->first, - dv)); - else if (what_stmt_num[j->first][kk - - 1] != -1) - D.push_back( - std::make_pair( - what_stmt_num[j->first][kk - - 1], - dv)); - for (int t = 0; t < unroll_amount - 1; - t++) - if (what_stmt_num[i][t] != -1) - for (int kk = 0; - kk < unroll_amount; - kk++) - if (kk == 0) - dep.connect( - what_stmt_num[i][t], - j->first, dv); - else if (what_stmt_num[j->first][kk - - 1] != -1) - dep.connect( - what_stmt_num[i][t], - what_stmt_num[j->first][kk - - 1], - dv); - } else { - for (int kk = 0; kk < unroll_amount; - kk++) { - if (lb != -posInfinity) { - if (kk * stride - < int_mod(lb, - static_cast<coef_t>(new_stride))) - dv.lbounds[dep_dim] = - floor( - static_cast<double>(lb) - / new_stride) - * new_stride - + new_stride; - else - dv.lbounds[dep_dim] = - floor( - static_cast<double>(lb) - / new_stride) - * new_stride; - } - if (ub != posInfinity) { - if (kk * stride - > int_mod(ub, - static_cast<coef_t>(new_stride))) - dv.ubounds[dep_dim] = - floor( - static_cast<double>(ub) - / new_stride) - * new_stride - - new_stride; - else - dv.ubounds[dep_dim] = - floor( - static_cast<double>(ub) - / new_stride) - * new_stride; - } - if (dv.ubounds[dep_dim] - >= dv.lbounds[dep_dim]) { - if (kk == 0) - D.push_back( - std::make_pair( - j->first, - dv)); - else if (what_stmt_num[j->first][kk - - 1] != -1) - D.push_back( - std::make_pair( - what_stmt_num[j->first][kk - - 1], - dv)); - } - } - for (int t = 0; t < unroll_amount - 1; - t++) - if (what_stmt_num[i][t] != -1) - for (int kk = 0; - kk < unroll_amount; - kk++) { - if (lb != -posInfinity) { - if (kk * stride - < int_mod( - lb + t - + 1, - static_cast<coef_t>(new_stride))) - dv.lbounds[dep_dim] = - floor( - static_cast<double>(lb - + (t - + 1) - * stride) - / new_stride) - * new_stride - + new_stride; - else - dv.lbounds[dep_dim] = - floor( - static_cast<double>(lb - + (t - + 1) - * stride) - / new_stride) - * new_stride; - } - if (ub != posInfinity) { - if (kk * stride - > int_mod( - ub + t - + 1, - static_cast<coef_t>(new_stride))) - dv.ubounds[dep_dim] = - floor( - static_cast<double>(ub - + (t - + 1) - * stride) - / new_stride) - * new_stride - - new_stride; - else - dv.ubounds[dep_dim] = - floor( - static_cast<double>(ub - + (t - + 1) - * stride) - / new_stride) - * new_stride; - } - if (dv.ubounds[dep_dim] - >= dv.lbounds[dep_dim]) { - if (kk == 0) - dep.connect( - what_stmt_num[i][t], - j->first, - dv); - else if (what_stmt_num[j->first][kk - - 1] != -1) - dep.connect( - what_stmt_num[i][t], - what_stmt_num[j->first][kk - - 1], - dv); - } - } - } - } - } - - dep.vertex[i].second.erase(j++); - } else { - for (int kk = 0; kk < unroll_amount - 1; kk++) - if (what_stmt_num[i][kk] != -1) - dep.connect(what_stmt_num[i][kk], j->first, - j->second); - - j++; - } - } else { - if (same_loop.find(j->first) != same_loop.end()) - for (int k = 0; k < j->second.size(); k++) - for (int kk = 0; kk < unroll_amount - 1; kk++) - if (what_stmt_num[j->first][kk] != -1) - D.push_back( - std::make_pair( - what_stmt_num[j->first][kk], - j->second[k])); - j++; - } - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, D[j].first, D[j].second); - } - } - - // reset lexical order for the unrolled loop body - std::set<int> new_same_loop; - for (std::map<int, std::vector<int> >::iterator i = - what_stmt_num.begin(); i != what_stmt_num.end(); i++) { - new_same_loop.insert(i->first); - for (int j = 0; j < i->second.size(); j++) - new_same_loop.insert(i->second[j]); - } - setLexicalOrder(dim + 1, new_same_loop); - } else { - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) - add_loop_stride(stmt[*i].IS, bound, level - 1, - unroll_amount * stride); - - int max_level = stmt[stmt_num].loop_level.size(); - std::vector<std::pair<int, int> > stmt_order; - for (std::set<int>::iterator i = same_loop.begin(); - i != same_loop.end(); i++) - stmt_order.push_back( - std::make_pair( - get_const(stmt[*i].xform, 2 * max_level, - Output_Var), *i)); - sort(stmt_order.begin(), stmt_order.end()); - - Statement new_stmt; - new_stmt.code = NULL; - for (int j = 1; j < unroll_amount; j++) - for (int i = 0; i < stmt_order.size(); i++) { - Tuple<CG_outputRepr *> funcList; - Tuple<std::string> loop_vars; - loop_vars.append( - stmt[stmt_order[i].second].IS.set_var(level)->name()); - funcList.append( - ocg->CreatePlus( - ocg->CreateIdent( - stmt[stmt_order[i].second].IS.set_var( - level)->name()), - ocg->CreateInt(j * stride))); - CG_outputRepr *code = ocg->CreatePlaceHolder(0, - stmt[stmt_order[i].second].code->clone(), funcList, - loop_vars); - new_stmt.code = ocg->StmtListAppend(new_stmt.code, code); - } - - new_stmt.IS = copy(stmt[stmt_num].IS); - new_stmt.xform = copy(stmt[stmt_num].xform); - assign_const(new_stmt.xform, 2 * max_level, - stmt_order[stmt_order.size() - 1].first + 1); - new_stmt.loop_level = stmt[stmt_num].loop_level; - stmt.push_back(new_stmt); - dep.insert(); - - // update dependence graph - if (stmt[stmt_num].loop_level[level - 1].type == LoopLevelOriginal) { - int dep_dim = stmt[stmt_num].loop_level[level - 1].payload; - int new_stride = unroll_amount * stride; - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::pair<int, std::vector<DependenceVector> > > D; - - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end();) { - if (same_loop.find(i) != same_loop.end()) { - if (same_loop.find(j->first) != same_loop.end()) { - std::vector<DependenceVector> dvs11, dvs12, dvs22, - dvs21; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.type == DEP_CONTROL - || dv.type == DEP_UNKNOWN) { - if (i == j->first) { - dvs11.push_back(dv); - dvs22.push_back(dv); - } else - throw loop_error( - "unrolled statements lumped together illegally"); - } else { - coef_t lb = dv.lbounds[dep_dim]; - coef_t ub = dv.ubounds[dep_dim]; - if (ub == lb - && int_mod(lb, - static_cast<coef_t>(new_stride)) - == 0) { - dvs11.push_back(dv); - dvs22.push_back(dv); - } else { - if (lb != -posInfinity) - dv.lbounds[dep_dim] = ceil( - static_cast<double>(lb) - / new_stride) - * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = floor( - static_cast<double>(ub) - / new_stride) - * new_stride; - if (dv.ubounds[dep_dim] - >= dv.lbounds[dep_dim]) - dvs11.push_back(dv); - - if (lb != -posInfinity) - dv.lbounds[dep_dim] = ceil( - static_cast<double>(lb) - / new_stride) - * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = ceil( - static_cast<double>(ub) - / new_stride) - * new_stride; - if (dv.ubounds[dep_dim] - >= dv.lbounds[dep_dim]) - dvs21.push_back(dv); - - if (lb != -posInfinity) - dv.lbounds[dep_dim] = floor( - static_cast<double>(lb) - / new_stride) - * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = floor( - static_cast<double>(ub - - stride) - / new_stride) - * new_stride; - if (dv.ubounds[dep_dim] - >= dv.lbounds[dep_dim]) - dvs12.push_back(dv); - - if (lb != -posInfinity) - dv.lbounds[dep_dim] = floor( - static_cast<double>(lb) - / new_stride) - * new_stride; - if (ub != posInfinity) - dv.ubounds[dep_dim] = ceil( - static_cast<double>(ub - - stride) - / new_stride) - * new_stride; - if (dv.ubounds[dep_dim] - >= dv.lbounds[dep_dim]) - dvs22.push_back(dv); - } - } - } - if (dvs11.size() > 0) - D.push_back(std::make_pair(i, dvs11)); - if (dvs22.size() > 0) - dep.connect(old_num_stmt, old_num_stmt, dvs22); - if (dvs12.size() > 0) - D.push_back( - std::make_pair(old_num_stmt, dvs12)); - if (dvs21.size() > 0) - dep.connect(old_num_stmt, i, dvs21); - - dep.vertex[i].second.erase(j++); - } else { - dep.connect(old_num_stmt, j->first, j->second); - j++; - } - } else { - if (same_loop.find(j->first) != same_loop.end()) - D.push_back( - std::make_pair(old_num_stmt, j->second)); - j++; - } - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, D[j].first, D[j].second); - } - } - } - - return result; -} - -std::vector<int> Loop::getLexicalOrder(int stmt_num) const { - assert(stmt_num < stmt.size()); - - const int n = stmt[stmt_num].xform.n_out(); - std::vector<int> lex(n, 0); - - for (int i = 0; i < n; i += 2) - lex[i] = get_const(stmt[stmt_num].xform, i, Output_Var); - - return lex; -} - -std::set<int> Loop::getStatements(const std::vector<int> &lex, int dim) const { - const int m = stmt.size(); - - std::set<int> same_loops; - for (int i = 0; i < m; i++) { - if (dim < 0) - same_loops.insert(i); - else { - std::vector<int> a_lex = getLexicalOrder(i); - int j; - for (j = 0; j <= dim; j += 2) - if (lex[j] != a_lex[j]) - break; - if (j > dim) - same_loops.insert(i); - } - } - - return same_loops; -} - -void Loop::shiftLexicalOrder(const std::vector<int> &lex, int dim, int amount) { - const int m = stmt.size(); - - if (amount == 0) - return; - - for (int i = 0; i < m; i++) { - std::vector<int> lex2 = getLexicalOrder(i); - - bool need_shift = true; - - for (int j = 0; j < dim; j++) - if (lex2[j] != lex[j]) { - need_shift = false; - break; - } - - if (!need_shift) - continue; - - if (amount > 0) { - if (lex2[dim] < lex[dim]) - continue; - } else if (amount < 0) { - if (lex2[dim] > lex[dim]) - continue; - } - - assign_const(stmt[i].xform, dim, lex2[dim] + amount); - } -} - -void Loop::setLexicalOrder(int dim, const std::set<int> &active, - int starting_order) { - if (active.size() == 0) - return; - - // check for sanity of parameters - if (dim < 0 || dim % 2 != 0) - throw std::invalid_argument( - "invalid constant loop level to set lexicographical order"); - std::vector<int> lex; - int ref_stmt_num; - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - if ((*i) < 0 || (*i) >= stmt.size()) - throw std::invalid_argument( - "invalid statement number " + to_string(*i)); - if (dim >= stmt[*i].xform.n_out()) - throw std::invalid_argument( - "invalid constant loop level to set lexicographical order"); - if (i == active.begin()) { - lex = getLexicalOrder(*i); - ref_stmt_num = *i; - } else { - std::vector<int> lex2 = getLexicalOrder(*i); - for (int j = 0; j < dim; j += 2) - if (lex[j] != lex2[j]) - throw std::invalid_argument( - "statements are not in the same sub loop nest"); - } - } - - // sepearate statements by current loop level types - int level = (dim + 2) / 2; - std::map<std::pair<LoopLevelType, int>, std::set<int> > active_by_level_type; - std::set<int> active_by_no_level; - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - if (level > stmt[*i].loop_level.size()) - active_by_no_level.insert(*i); - else - active_by_level_type[std::make_pair( - stmt[*i].loop_level[level - 1].type, - stmt[*i].loop_level[level - 1].payload)].insert(*i); - } - - // further separate statements due to control dependences - std::vector<std::set<int> > active_by_level_type_splitted; - for (std::map<std::pair<LoopLevelType, int>, std::set<int> >::iterator i = - active_by_level_type.begin(); i != active_by_level_type.end(); i++) - active_by_level_type_splitted.push_back(i->second); - for (std::set<int>::iterator i = active_by_no_level.begin(); - i != active_by_no_level.end(); i++) - for (int j = active_by_level_type_splitted.size() - 1; j >= 0; j--) { - std::set<int> controlled, not_controlled; - for (std::set<int>::iterator k = - active_by_level_type_splitted[j].begin(); - k != active_by_level_type_splitted[j].end(); k++) { - std::vector<DependenceVector> dvs = dep.getEdge(*i, *k); - bool is_controlled = false; - for (int kk = 0; kk < dvs.size(); kk++) - if (dvs[kk].type = DEP_CONTROL) { - is_controlled = true; - break; - } - if (is_controlled) - controlled.insert(*k); - else - not_controlled.insert(*k); - } - if (controlled.size() != 0 && not_controlled.size() != 0) { - active_by_level_type_splitted.erase( - active_by_level_type_splitted.begin() + j); - active_by_level_type_splitted.push_back(controlled); - active_by_level_type_splitted.push_back(not_controlled); - } - } - - // set lexical order separating loops with different loop types first - if (active_by_level_type_splitted.size() + active_by_no_level.size() > 1) { - int dep_dim = get_last_dep_dim_before(ref_stmt_num, level) + 1; - - Graph<std::set<int>, Empty> g; - for (std::vector<std::set<int> >::iterator i = - active_by_level_type_splitted.begin(); - i != active_by_level_type_splitted.end(); i++) - g.insert(*i); - for (std::set<int>::iterator i = active_by_no_level.begin(); - i != active_by_no_level.end(); i++) { - std::set<int> t; - t.insert(*i); - g.insert(t); - } - for (int i = 0; i < g.vertex.size(); i++) - for (int j = i + 1; j < g.vertex.size(); j++) { - bool connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); - ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); - jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*ii, - *jj); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() - || (dvs[k].is_data_dependence() - && !dvs[k].has_been_carried_before( - dep_dim))) { - g.connect(i, j); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); - ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); - jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*jj, - *ii); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() - || (dvs[k].is_data_dependence() - && !dvs[k].has_been_carried_before( - dep_dim))) { - g.connect(j, i); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - } - - std::vector<std::set<int> > s = g.topoSort(); - if (s.size() != g.vertex.size()) - throw loop_error( - "cannot separate statements with different loop types at loop level " - + to_string(level)); - - // assign lexical order - int order = starting_order; - for (int i = 0; i < s.size(); i++) { - std::set<int> &cur_scc = g.vertex[*(s[i].begin())].first; - int sz = cur_scc.size(); - if (sz == 1) { - int cur_stmt = *(cur_scc.begin()); - assign_const(stmt[cur_stmt].xform, dim, order); - for (int j = dim + 2; j < stmt[cur_stmt].xform.n_out(); j += 2) - assign_const(stmt[cur_stmt].xform, j, 0); - order++; - } else { - setLexicalOrder(dim, cur_scc, order); - order += sz; - } - } - } - // set lexical order seperating single iteration statements and loops - else { - std::set<int> true_singles; - std::set<int> nonsingles; - std::map<coef_t, std::set<int> > fake_singles; - - // sort out statements that do not require loops - for (std::set<int>::iterator i = active.begin(); i != active.end(); - i++) { - Relation cur_IS = getNewIS(*i); - if (is_single_iteration(cur_IS, dim + 1)) { - bool is_all_single = true; - for (int j = dim + 3; j < stmt[*i].xform.n_out(); j += 2) - if (!is_single_iteration(cur_IS, j)) { - is_all_single = false; - break; - } - if (is_all_single) - true_singles.insert(*i); - else { - try { - fake_singles[get_const(cur_IS, dim + 1, Set_Var)].insert( - *i); - } catch (const std::exception &e) { - fake_singles[posInfinity].insert(*i); - } - } - } else - nonsingles.insert(*i); - } - - // split nonsingles forcibly according to negative dependences present (loop unfusible) - int dep_dim = get_dep_dim_of(ref_stmt_num, level); - Graph<int, Empty> g2; - for (std::set<int>::iterator i = nonsingles.begin(); - i != nonsingles.end(); i++) - g2.insert(*i); - for (int i = 0; i < g2.vertex.size(); i++) - for (int j = i + 1; j < g2.vertex.size(); j++) { - std::vector<DependenceVector> dvs = dep.getEdge( - g2.vertex[i].first, g2.vertex[j].first); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() - || (dvs[k].is_data_dependence() - && dvs[k].has_negative_been_carried_at( - dep_dim))) { - g2.connect(i, j); - break; - } - dvs = dep.getEdge(g2.vertex[j].first, g2.vertex[i].first); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() - || (dvs[k].is_data_dependence() - && dvs[k].has_negative_been_carried_at( - dep_dim))) { - g2.connect(j, i); - break; - } - } - - std::vector<std::set<int> > s2 = g2.packed_topoSort(); - - std::vector<std::set<int> > splitted_nonsingles; - for (int i = 0; i < s2.size(); i++) { - std::set<int> cur_scc; - for (std::set<int>::iterator j = s2[i].begin(); j != s2[i].end(); - j++) - cur_scc.insert(g2.vertex[*j].first); - splitted_nonsingles.push_back(cur_scc); - } - - // convert to dependence graph for grouped statements - dep_dim = get_last_dep_dim_before(ref_stmt_num, level) + 1; - Graph<std::set<int>, Empty> g; - for (std::set<int>::iterator i = true_singles.begin(); - i != true_singles.end(); i++) { - std::set<int> t; - t.insert(*i); - g.insert(t); - } - for (int i = 0; i < splitted_nonsingles.size(); i++) { - g.insert(splitted_nonsingles[i]); - } - for (std::map<coef_t, std::set<int> >::iterator i = - fake_singles.begin(); i != fake_singles.end(); i++) - g.insert((*i).second); - - for (int i = 0; i < g.vertex.size(); i++) - for (int j = i + 1; j < g.vertex.size(); j++) { - bool connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); - ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); - jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*ii, - *jj); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() - || (dvs[k].is_data_dependence() - && !dvs[k].has_been_carried_before( - dep_dim))) { - g.connect(i, j); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - connected = false; - for (std::set<int>::iterator ii = g.vertex[i].first.begin(); - ii != g.vertex[i].first.end(); ii++) { - for (std::set<int>::iterator jj = g.vertex[j].first.begin(); - jj != g.vertex[j].first.end(); jj++) { - std::vector<DependenceVector> dvs = dep.getEdge(*jj, - *ii); - for (int k = 0; k < dvs.size(); k++) - if (dvs[k].is_control_dependence() - || (dvs[k].is_data_dependence() - && !dvs[k].has_been_carried_before( - dep_dim))) { - g.connect(j, i); - connected = true; - break; - } - if (connected) - break; - } - if (connected) - break; - } - } - - // topological sort according to chun's permute algorithm - std::vector<std::set<int> > s = g.topoSort(); - - // assign lexical order - int order = starting_order; - for (int i = 0; i < s.size(); i++) { - // translate each SCC into original statements - std::set<int> cur_scc; - for (std::set<int>::iterator j = s[i].begin(); j != s[i].end(); j++) - copy(g.vertex[*j].first.begin(), g.vertex[*j].first.end(), - inserter(cur_scc, cur_scc.begin())); - - // now assign the constant - for (std::set<int>::iterator j = cur_scc.begin(); - j != cur_scc.end(); j++) - assign_const(stmt[*j].xform, dim, order); - - if (cur_scc.size() > 1) - setLexicalOrder(dim + 2, cur_scc); - else if (cur_scc.size() == 1) { - int cur_stmt = *(cur_scc.begin()); - for (int j = dim + 2; j < stmt[cur_stmt].xform.n_out(); j += 2) - assign_const(stmt[cur_stmt].xform, j, 0); - } - - if (cur_scc.size() > 0) - order++; - } - } -} - -void Loop::apply_xform() { - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - apply_xform(active); -} - -void Loop::apply_xform(int stmt_num) { - std::set<int> active; - active.insert(stmt_num); - apply_xform(active); -} - -void Loop::apply_xform(std::set<int> &active) { - int max_n = 0; - - CG_outputBuilder *ocg = ir->builder(); - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) { - int n = stmt[*i].loop_level.size(); - if (n > max_n) - max_n = n; - - std::vector<int> lex = getLexicalOrder(*i); - - Relation mapping(2 * n + 1, n); - F_And *f_root = mapping.add_and(); - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(j), 1); - h.update_coef(mapping.input_var(2 * j), -1); - } - mapping = Composition(mapping, stmt[*i].xform); - mapping.simplify(); - - // match omega input/output variables to variable names in the code - for (int j = 1; j <= stmt[*i].IS.n_set(); j++) - mapping.name_input_var(j, stmt[*i].IS.set_var(j)->name()); - for (int j = 1; j <= n; j++) - mapping.name_output_var(j, - tmp_loop_var_name_prefix - + to_string(tmp_loop_var_name_counter + j - 1)); - mapping.setup_names(); - - Relation known = Extend_Set(copy(this->known), - mapping.n_out() - this->known.n_set()); - //stmt[*i].code = outputStatement(ocg, stmt[*i].code, 0, mapping, known, std::vector<CG_outputRepr *>(mapping.n_out(), NULL)); - stmt[*i].code = outputStatement(ocg, stmt[*i].code, 0, mapping, known, - std::vector<CG_outputRepr *>(mapping.n_out())); - stmt[*i].IS = Range(Restrict_Domain(mapping, stmt[*i].IS)); - stmt[*i].IS.simplify(); - - // replace original transformation relation with straight 1-1 mapping - mapping = Relation(n, 2 * n + 1); - f_root = mapping.add_and(); - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2 * j), 1); - h.update_coef(mapping.input_var(j), -1); - } - for (int j = 1; j <= 2 * n + 1; j += 2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(j), 1); - h.update_const(-lex[j - 1]); - } - stmt[*i].xform = mapping; - } - - tmp_loop_var_name_counter += max_n; -} - -void Loop::addKnown(const Relation &cond) { - int n1 = this->known.n_set(); - - Relation r = copy(cond); - int n2 = r.n_set(); - - if (n1 < n2) - this->known = Extend_Set(this->known, n2 - n1); - else if (n1 > n2) - r = Extend_Set(r, n1 - n2); - - this->known = Intersection(this->known, r); -} - -bool Loop::nonsingular(const std::vector<std::vector<int> > &T) { - if (stmt.size() == 0) - return true; - - // check for sanity of parameters - for (int i = 0; i < stmt.size(); i++) { - if (stmt[i].loop_level.size() != num_dep_dim) - throw std::invalid_argument( - "nonsingular loop transformations must be applied to original perfect loop nest"); - for (int j = 0; j < stmt[i].loop_level.size(); j++) - if (stmt[i].loop_level[j].type != LoopLevelOriginal) - throw std::invalid_argument( - "nonsingular loop transformations must be applied to original perfect loop nest"); - } - if (T.size() != num_dep_dim) - throw std::invalid_argument("invalid transformation matrix"); - for (int i = 0; i < stmt.size(); i++) - if (T[i].size() != num_dep_dim + 1 && T[i].size() != num_dep_dim) - throw std::invalid_argument("invalid transformation matrix"); - - // build relation from matrix - Relation mapping(2 * num_dep_dim + 1, 2 * num_dep_dim + 1); - F_And *f_root = mapping.add_and(); - for (int i = 0; i < num_dep_dim; i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(2 * (i + 1)), -1); - for (int j = 0; j < num_dep_dim; j++) - if (T[i][j] != 0) - h.update_coef(mapping.input_var(2 * (j + 1)), T[i][j]); - if (T[i].size() == num_dep_dim + 1) - h.update_const(T[i][num_dep_dim]); - } - for (int i = 1; i <= 2 * num_dep_dim + 1; i += 2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.output_var(i), -1); - h.update_coef(mapping.input_var(i), 1); - } - - // update transformation relations - for (int i = 0; i < stmt.size(); i++) - stmt[i].xform = Composition(copy(mapping), stmt[i].xform); - - // update dependence graph - for (int i = 0; i < dep.vertex.size(); i++) - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); - j++) { - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - switch (dv.type) { - case DEP_W2R: - case DEP_R2W: - case DEP_W2W: - case DEP_R2R: { - std::vector<coef_t> lbounds(num_dep_dim), ubounds( - num_dep_dim); - for (int p = 0; p < num_dep_dim; p++) { - coef_t lb = 0; - coef_t ub = 0; - for (int q = 0; q < num_dep_dim; q++) { - if (T[p][q] > 0) { - if (lb == -posInfinity - || dv.lbounds[q] == -posInfinity) - lb = -posInfinity; - else - lb += T[p][q] * dv.lbounds[q]; - if (ub == posInfinity - || dv.ubounds[q] == posInfinity) - ub = posInfinity; - else - ub += T[p][q] * dv.ubounds[q]; - } else if (T[p][q] < 0) { - if (lb == -posInfinity - || dv.ubounds[q] == posInfinity) - lb = -posInfinity; - else - lb += T[p][q] * dv.ubounds[q]; - if (ub == posInfinity - || dv.lbounds[q] == -posInfinity) - ub = posInfinity; - else - ub += T[p][q] * dv.lbounds[q]; - } - } - if (T[p].size() == num_dep_dim + 1) { - if (lb != -posInfinity) - lb += T[p][num_dep_dim]; - if (ub != posInfinity) - ub += T[p][num_dep_dim]; - } - lbounds[p] = lb; - ubounds[p] = ub; - } - dv.lbounds = lbounds; - dv.ubounds = ubounds; - - break; - } - default: - ; - } - } - j->second = dvs; - } - - // set constant loop values - std::set<int> active; - for (int i = 0; i < stmt.size(); i++) - active.insert(i); - setLexicalOrder(0, active); - - return true; -} - -void Loop::skew(const std::set<int> &stmt_nums, int level, - const std::vector<int> &skew_amount) { - if (stmt_nums.size() == 0) - return; - - // check for sanity of parameters - int ref_stmt_num = *(stmt_nums.begin()); - std::vector<std::set<int> > array_of_deps; - for (std::set<int>::const_iterator i = stmt_nums.begin(); - i != stmt_nums.end(); i++) { - if (*i < 0 || *i >= stmt.size()) - throw std::invalid_argument( - "invalid statement number " + to_string(*i)); - if (level < 1 || level > stmt[*i].loop_level.size()) - throw std::invalid_argument( - "invalid loop level " + to_string(level)); - for (int j = stmt[*i].loop_level.size(); j < skew_amount.size(); j++) - if (skew_amount[j] != 0) - throw std::invalid_argument("invalid skewing formula"); - } - - // set trasformation relations - for (std::set<int>::const_iterator i = stmt_nums.begin(); - i != stmt_nums.end(); i++) { - int n = stmt[*i].xform.n_out(); - Relation r(n, n); - F_And *f_root = r.add_and(); - for (int j = 1; j <= n; j++) - if (j != 2 * level) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j), -1); - } - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.output_var(2 * level), -1); - for (int j = 0; j < skew_amount.size(); j++) - if (skew_amount[j] != 0) - h.update_coef(r.input_var(2 * (j + 1)), skew_amount[j]); - - stmt[*i].xform = Composition(r, stmt[*i].xform); - stmt[*i].xform.simplify(); - applyXform(*i); - std::set<int> dont_consider; - //} - - // update dependence graph - if (stmt[ref_stmt_num].loop_level[level - 1].type - == LoopLevelOriginal) { - int dep_dim = stmt[ref_stmt_num].loop_level[level - 1].payload; - for (std::set<int>::const_iterator i = stmt_nums.begin(); - i != stmt_nums.end(); i++) - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[*i].second.begin(); - j != dep.vertex[*i].second.end(); j++) - if (stmt_nums.find(j->first) != stmt_nums.end()) { - // dependence between skewed statements - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - coef_t lb = 0; - coef_t ub = 0; - for (int kk = 0; kk < skew_amount.size(); - kk++) { - int cur_dep_dim = get_dep_dim_of(*i, - kk + 1); - if (skew_amount[kk] > 0) { - if (lb != -posInfinity - && stmt[*i].loop_level[kk].type - == LoopLevelOriginal - && dv.lbounds[cur_dep_dim] - != -posInfinity) - lb += skew_amount[kk] - * dv.lbounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 - && !(dv.lbounds[cur_dep_dim] - == 0 - && dv.ubounds[cur_dep_dim] - == 0)) - lb = -posInfinity; - } - if (ub != posInfinity - && stmt[*i].loop_level[kk].type - == LoopLevelOriginal - && dv.ubounds[cur_dep_dim] - != posInfinity) - ub += skew_amount[kk] - * dv.ubounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 - && !(dv.lbounds[cur_dep_dim] - == 0 - && dv.ubounds[cur_dep_dim] - == 0)) - ub = posInfinity; - } - } else if (skew_amount[kk] < 0) { - if (lb != -posInfinity - && stmt[*i].loop_level[kk].type - == LoopLevelOriginal - && dv.ubounds[cur_dep_dim] - != posInfinity) - lb += skew_amount[kk] - * dv.ubounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 - && !(dv.lbounds[cur_dep_dim] - == 0 - && dv.ubounds[cur_dep_dim] - == 0)) - lb = -posInfinity; - } - if (ub != posInfinity - && stmt[*i].loop_level[kk].type - == LoopLevelOriginal - && dv.lbounds[cur_dep_dim] - != -posInfinity) - ub += skew_amount[kk] - * dv.lbounds[cur_dep_dim]; - else { - if (cur_dep_dim != -1 - && !(dv.lbounds[cur_dep_dim] - == 0 - && dv.ubounds[cur_dep_dim] - == 0)) - ub = posInfinity; - } - } - } - if ((dv.isCarried(dep_dim) - && dv.hasPositive(dep_dim)) && dv.quasi) - dv.quasi = false; - - if ((dv.isCarried(dep_dim) - && dv.hasNegative(dep_dim)) - && !dv.quasi) - throw loop_error( - "loop error: Skewing is illegal, dependence violation!"); - dv.lbounds[dep_dim] = lb; - dv.ubounds[dep_dim] = ub; - if ((dv.isCarried(dep_dim) - && dv.hasPositive(dep_dim)) && dv.quasi) - dv.quasi = false; - - if ((dv.isCarried(dep_dim) - && dv.hasNegative(dep_dim)) - && !dv.quasi) - throw loop_error( - "loop error: Skewing is illegal, dependence violation!"); - } - } - - j->second = dvs; - } - } else { - // dependence from skewed statement to unskewed statement becomes jumbled, - // put distance value at skewed dimension to unknown - /*std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - } - j->second = dvs; - */ - dont_consider.insert(j->first); - } - for (int l = 0; l < dep.vertex.size(); l++) - if (stmt_nums.find(l) == stmt_nums.end()) - if (dont_consider.find(l) == stmt_nums.end() - && (dep.vertex[l].second.find(*i) - != dep.vertex[l].second.end())) - dont_consider.insert(l); - array_of_deps.push_back(dont_consider); - } - /*for (int i = 0; i < dep.vertex.size(); i++) - if (stmt_nums.find(i) == stmt_nums.end()) - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end(); j++) - if (stmt_nums.find(j->first) != stmt_nums.end()) { - // dependence from unskewed statement to skewed statement becomes jumbled, - // put distance value at skewed dimension to unknown - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - dv.lbounds[dep_dim] = -posInfinity; - dv.ubounds[dep_dim] = posInfinity; - } - } - j->second = dvs; - } - }*/ - std::set<int>::const_iterator w = stmt_nums.begin(); - for (int i = 0; i < array_of_deps.size() && w != stmt_nums.end(); i++) - for (std::set<int>::const_iterator j = array_of_deps[i].begin(); - j != array_of_deps[i].end(); j++) { - if (dep.vertex[*w].second.find(*j) != dep.vertex[*w].second.end()) - dep.disconnect(*w, *j); - if (dep.vertex[*j].second.find(*w) != dep.vertex[*j].second.end()) - dep.disconnect(*j, *w); - int x, y; - std::pair<std::vector<DependenceVector>, - std::vector<DependenceVector> > dv_s; - if ((*w) <= (*j)) { - x = *w; - y = *j; - - dv_s = test_data_dependences(ir_, stmt[x].code, stmt[x].IS, - stmt[y].code, stmt[y].IS, freevar, index, x, y); - } else { - x = *j; - y = *w; - dv_s = test_data_dependences(ir_, stmt[y].code, stmt[y].IS, - stmt[x].code, stmt[x].IS, freevar, index, x, y); - } - for (int k = 0; k < dv_s.first.size(); k++) { - if (is_dependence_valid_based_on_lex_order(x, y, dv_s.first[k], - true)) - dep.connect(x, y, dv_s.first[k]); - else - dep.connect(y, x, dv_s.first[k].reverse()); - } - for (int k = 0; k < dv_s.second.size(); k++) { - if (is_dependence_valid_based_on_lex_order(x, y, dv_s.second[k], - false)) - dep.connect(y, x, dv_s.second[k]); - else - dep.connect(x, y, dv_s.second[k].reverse()); - } - w++; - } -} - -void Loop::shift(const std::set<int> &stmt_nums, int level, int shift_amount) { - if (stmt_nums.size() == 0) - return; - - // check for sanity of parameters - int ref_stmt_num = *(stmt_nums.begin()); - for (std::set<int>::const_iterator i = stmt_nums.begin(); - i != stmt_nums.end(); i++) { - if (*i < 0 || *i >= stmt.size()) - throw std::invalid_argument( - "invalid statement number " + to_string(*i)); - if (level < 1 || level > stmt[*i].loop_level.size()) - throw std::invalid_argument( - "invalid loop level " + to_string(level)); - } - - // do nothing - if (shift_amount == 0) - return; - - // set trasformation relations - for (std::set<int>::const_iterator i = stmt_nums.begin(); - i != stmt_nums.end(); i++) { - int n = stmt[*i].xform.n_out(); - - Relation r(n, n); - F_And *f_root = r.add_and(); - for (int j = 1; j <= n; j++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(r.input_var(j), 1); - h.update_coef(r.output_var(j), -1); - if (j == 2 * level) - h.update_const(shift_amount); - } - - stmt[*i].xform = Composition(r, stmt[*i].xform); - stmt[*i].xform.simplify(); - } - - // update dependence graph - if (stmt[ref_stmt_num].loop_level[level - 1].type == LoopLevelOriginal) { - int dep_dim = stmt[ref_stmt_num].loop_level[level - 1].payload; - for (std::set<int>::const_iterator i = stmt_nums.begin(); - i != stmt_nums.end(); i++) - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[*i].second.begin(); - j != dep.vertex[*i].second.end(); j++) - if (stmt_nums.find(j->first) == stmt_nums.end()) { - // dependence from shifted statement to unshifted statement - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - if (dv.lbounds[dep_dim] != -posInfinity) - dv.lbounds[dep_dim] -= shift_amount; - if (dv.ubounds[dep_dim] != posInfinity) - dv.ubounds[dep_dim] -= shift_amount; - } - } - j->second = dvs; - } - for (int i = 0; i < dep.vertex.size(); i++) - if (stmt_nums.find(i) == stmt_nums.end()) - for (DependenceGraph::EdgeList::iterator j = - dep.vertex[i].second.begin(); - j != dep.vertex[i].second.end(); j++) - if (stmt_nums.find(j->first) != stmt_nums.end()) { - // dependence from unshifted statement to shifted statement - std::vector<DependenceVector> dvs = j->second; - for (int k = 0; k < dvs.size(); k++) { - DependenceVector &dv = dvs[k]; - if (dv.is_data_dependence()) { - if (dv.lbounds[dep_dim] != -posInfinity) - dv.lbounds[dep_dim] += shift_amount; - if (dv.ubounds[dep_dim] != posInfinity) - dv.ubounds[dep_dim] += shift_amount; - } - } - j->second = dvs; - } - } -} - -// bool Loop::fuse(const std::set<int> &stmt_nums, int level) { -// if (stmt_nums.size() == 0 || stmt_nums.size() == 1) -// return true; -// int dim = 2*level-1; - -// // check for sanity of parameters -// std::vector<int> ref_lex; -// for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { -// if (*i < 0 || *i >= stmt.size()) -// throw std::invalid_argument("invalid statement number " + to_string(*i)); -// if (level < 1 || level > (stmt[*i].xform.n_out()-1)/2) -// throw std::invalid_argument("invalid loop level " + to_string(level)); -// if (ref_lex.size() == 0) -// ref_lex = getLexicalOrder(*i); -// else { -// std::vector<int> lex = getLexicalOrder(*i); -// for (int j = 0; j < dim-1; j+=2) -// if (lex[j] != ref_lex[j]) -// throw std::invalid_argument("statements for fusion must be in the same level-" + to_string(level-1) + " subloop"); -// } -// } - -// // collect lexicographical order values from to-be-fused statements -// std::set<int> lex_values; -// for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { -// std::vector<int> lex = getLexicalOrder(*i); -// lex_values.insert(lex[dim-1]); -// } -// if (lex_values.size() == 1) -// return true; - -// // negative dependence would prevent fusion -// int dep_dim = xform_index[dim].first; -// for (std::set<int>::iterator i = lex_values.begin(); i != lex_values.end(); i++) { -// ref_lex[dim-1] = *i; -// std::set<int> a = getStatements(ref_lex, dim-1); -// std::set<int>::iterator j = i; -// j++; -// for (; j != lex_values.end(); j++) { -// ref_lex[dim-1] = *j; -// std::set<int> b = getStatements(ref_lex, dim-1); -// for (std::set<int>::iterator ii = a.begin(); ii != a.end(); ii++) -// for (std::set<int>::iterator jj = b.begin(); jj != b.end(); jj++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*ii, *jj); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim) && dvs[k].hasNegative(dep_dim)) -// throw loop_error("loop error: statements " + to_string(*ii) + " and " + to_string(*jj) + " cannot be fused together due to negative dependence"); -// dvs = dep.getEdge(*jj, *ii); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim) && dvs[k].hasNegative(dep_dim)) -// throw loop_error("loop error: statements " + to_string(*jj) + " and " + to_string(*ii) + " cannot be fused together due to negative dependence"); -// } -// } -// } - -// // collect all other lexicographical order values from the subloop -// // enclosing these to-be-fused loops -// std::set<int> same_loop = getStatements(ref_lex, dim-3); -// std::set<int> other_lex_values; -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// std::vector<int> lex = getLexicalOrder(*i); -// if (lex_values.find(lex[dim-1]) == lex_values.end()) -// other_lex_values.insert(lex[dim-1]); -// } - -// // update to-be-fused loops due to dependence cycle -// Graph<std::set<int>, Empty> g; -// { -// std::set<int> t; -// for (std::set<int>::iterator i = lex_values.begin(); i != lex_values.end(); i++) { -// ref_lex[dim-1] = *i; -// std::set<int> t2 = getStatements(ref_lex, dim-1); -// std::set_union(t.begin(), t.end(), t2.begin(), t2.end(), inserter(t, t.begin())); -// } -// g.insert(t); -// } -// for (std::set<int>::iterator i = other_lex_values.begin(); i != other_lex_values.end(); i++) { -// ref_lex[dim-1] = *i; -// std::set<int> t = getStatements(ref_lex, dim-1); -// g.insert(t); -// } -// for (int i = 0; i < g.vertex.size(); i++) -// for (int j = i+1; j < g.vertex.size(); j++) -// for (std::set<int>::iterator ii = g.vertex[i].first.begin(); ii != g.vertex[i].first.end(); ii++) -// for (std::set<int>::iterator jj = g.vertex[j].first.begin(); jj != g.vertex[j].first.end(); jj++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*ii, *jj); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(i, j); -// break; -// } -// dvs = dep.getEdge(*jj, *ii); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(j, i); -// break; -// } -// } -// std::vector<std::set<int> > s = g.topoSort(); -// int fused_lex_value = 0; -// for (int i = 0; i < s.size(); i++) -// if (s[i].find(0) != s[i].end()) { -// // now add additional lexicographical order values -// for (std::set<int>::iterator j = s[i].begin(); j != s[i].end(); j++) -// if (*j != 0) { -// int stmt = *(g.vertex[*j].first.begin()); -// std::vector<int> lex = getLexicalOrder(stmt); -// lex_values.insert(lex[dim-1]); -// } - -// if (s.size() > 1) { -// if (i == 0) { -// int min_lex_value; -// for (std::set<int>::iterator j = s[i+1].begin(); j != s[i+1].end(); j++) { -// int stmt = *(g.vertex[*j].first.begin()); -// std::vector<int> lex = getLexicalOrder(stmt); -// if (j == s[i+1].begin()) -// min_lex_value = lex[dim-1]; -// else if (lex[dim-1] < min_lex_value) -// min_lex_value = lex[dim-1]; -// } -// fused_lex_value = min_lex_value - 1; -// } -// else { -// int max_lex_value; -// for (std::set<int>::iterator j = s[i-1].begin(); j != s[i-1].end(); j++) { -// int stmt = *(g.vertex[*j].first.begin()); -// std::vector<int> lex = getLexicalOrder(stmt); -// if (j == s[i-1].begin()) -// max_lex_value = lex[dim-1]; -// else if (lex[dim-1] > max_lex_value) -// max_lex_value = lex[dim-1]; -// } -// fused_lex_value = max_lex_value + 1; -// } -// } - -// break; -// } - -// // sort the newly updated to-be-fused lexicographical order values -// std::vector<int> ordered_lex_values; -// for (std::set<int>::iterator i = lex_values.begin(); i != lex_values.end(); i++) -// ordered_lex_values.push_back(*i); -// std::sort(ordered_lex_values.begin(), ordered_lex_values.end()); - -// // make sure internal loops inside to-be-fused loops have the same -// // lexicographical order before and after fusion -// std::vector<std::pair<int, int> > inside_lex_range(ordered_lex_values.size()); -// for (int i = 0; i < ordered_lex_values.size(); i++) { -// ref_lex[dim-1] = ordered_lex_values[i]; -// std::set<int> the_stmts = getStatements(ref_lex, dim-1); -// std::set<int>::iterator j = the_stmts.begin(); -// std::vector<int> lex = getLexicalOrder(*j); -// int min_inside_lex_value = lex[dim+1]; -// int max_inside_lex_value = lex[dim+1]; -// j++; -// for (; j != the_stmts.end(); j++) { -// std::vector<int> lex = getLexicalOrder(*j); -// if (lex[dim+1] < min_inside_lex_value) -// min_inside_lex_value = lex[dim+1]; -// if (lex[dim+1] > max_inside_lex_value) -// max_inside_lex_value = lex[dim+1]; -// } -// inside_lex_range[i].first = min_inside_lex_value; -// inside_lex_range[i].second = max_inside_lex_value; -// } -// for (int i = 1; i < ordered_lex_values.size(); i++) -// if (inside_lex_range[i].first <= inside_lex_range[i-1].second) { -// int shift_lex_value = inside_lex_range[i-1].second - inside_lex_range[i].first + 1; -// ref_lex[dim-1] = ordered_lex_values[i]; -// ref_lex[dim+1] = inside_lex_range[i].first; -// shiftLexicalOrder(ref_lex, dim+1, shift_lex_value); -// inside_lex_range[i].first += shift_lex_value; -// inside_lex_range[i].second += shift_lex_value; -// } - -// // set lexicographical order for fused loops -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { -// std::vector<int> lex = getLexicalOrder(*i); -// if (lex_values.find(lex[dim-1]) != lex_values.end()) -// assign_const(stmt[*i].xform, dim-1, fused_lex_value); -// } - -// // no need to update dependence graph -// ; - -// return true; -// } - -// bool Loop::distribute(const std::set<int> &stmt_nums, int level) { -// if (stmt_nums.size() == 0 || stmt_nums.size() == 1) -// return true; -// int dim = 2*level-1; - -// // check for sanity of parameters -// std::vector<int> ref_lex; -// for (std::set<int>::const_iterator i = stmt_nums.begin(); i != stmt_nums.end(); i++) { -// if (*i < 0 || *i >= stmt.size()) -// throw std::invalid_argument("invalid statement number " + to_string(*i)); -// if (level < 1 || level > (stmt[*i].xform.n_out()-1)/2) -// throw std::invalid_argument("invalid loop level " + to_string(level)); -// if (ref_lex.size() == 0) -// ref_lex = getLexicalOrder(*i); -// else { -// std::vector<int> lex = getLexicalOrder(*i); -// for (int j = 0; j <= dim-1; j+=2) -// if (lex[j] != ref_lex[j]) -// throw std::invalid_argument("statements for distribution must be in the same level-" + to_string(level) + " subloop"); -// } -// } - -// // find SCC in the to-be-distributed loop -// int dep_dim = xform_index[dim].first; -// std::set<int> same_loop = getStatements(ref_lex, dim-1); -// Graph<int, Empty> g; -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) -// g.insert(*i); -// for (int i = 0; i < g.vertex.size(); i++) -// for (int j = i+1; j < g.vertex.size(); j++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(g.vertex[i].first, g.vertex[j].first); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(i, j); -// break; -// } -// dvs = dep.getEdge(g.vertex[j].first, g.vertex[i].first); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g.connect(j, i); -// break; -// } -// } -// std::vector<std::set<int> > s = g.topoSort(); - -// // find statements that cannot be distributed due to dependence cycle -// Graph<std::set<int>, Empty> g2; -// for (int i = 0; i < s.size(); i++) { -// std::set<int> t; -// for (std::set<int>::iterator j = s[i].begin(); j != s[i].end(); j++) -// if (stmt_nums.find(g.vertex[*j].first) != stmt_nums.end()) -// t.insert(g.vertex[*j].first); -// if (!t.empty()) -// g2.insert(t); -// } -// for (int i = 0; i < g2.vertex.size(); i++) -// for (int j = i+1; j < g2.vertex.size(); j++) -// for (std::set<int>::iterator ii = g2.vertex[i].first.begin(); ii != g2.vertex[i].first.end(); ii++) -// for (std::set<int>::iterator jj = g2.vertex[j].first.begin(); jj != g2.vertex[j].first.end(); jj++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*ii, *jj); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g2.connect(i, j); -// break; -// } -// dvs = dep.getEdge(*jj, *ii); -// for (int k = 0; k < dvs.size(); k++) -// if (dvs[k].isCarried(dep_dim)) { -// g2.connect(j, i); -// break; -// } -// } -// std::vector<std::set<int> > s2 = g2.topoSort(); - -// // nothing to distribute -// if (s2.size() == 1) -// throw loop_error("loop error: no statement can be distributed due to dependence cycle"); - -// std::vector<std::set<int> > s3; -// for (int i = 0; i < s2.size(); i++) { -// std::set<int> t; -// for (std::set<int>::iterator j = s2[i].begin(); j != s2[i].end(); j++) -// std::set_union(t.begin(), t.end(), g2.vertex[*j].first.begin(), g2.vertex[*j].first.end(), inserter(t, t.begin())); -// s3.push_back(t); -// } - -// // associate other affected statements with the right distributed statements -// for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) -// if (stmt_nums.find(*i) == stmt_nums.end()) { -// bool is_inserted = false; -// int potential_insertion_point = 0; -// for (int j = 0; j < s3.size(); j++) { -// for (std::set<int>::iterator k = s3[j].begin(); k != s3[j].end(); k++) { -// std::vector<DependenceVector> dvs; -// dvs = dep.getEdge(*i, *k); -// for (int kk = 0; kk < dvs.size(); kk++) -// if (dvs[kk].isCarried(dep_dim)) { -// s3[j].insert(*i); -// is_inserted = true; -// break; -// } -// dvs = dep.getEdge(*k, *i); -// for (int kk = 0; kk < dvs.size(); kk++) -// if (dvs[kk].isCarried(dep_dim)) -// potential_insertion_point = j; -// } -// if (is_inserted) -// break; -// } - -// if (!is_inserted) -// s3[potential_insertion_point].insert(*i); -// } - -// // set lexicographical order after distribution -// int order = ref_lex[dim-1]; -// shiftLexicalOrder(ref_lex, dim-1, s3.size()-1); -// for (std::vector<std::set<int> >::iterator i = s3.begin(); i != s3.end(); i++) { -// for (std::set<int>::iterator j = (*i).begin(); j != (*i).end(); j++) -// assign_const(stmt[*j].xform, dim-1, order); -// order++; -// } - -// // no need to update dependence graph -// ; - -// return true; -// } - diff --git a/mem_mapping_utils.cc b/mem_mapping_utils.cc deleted file mode 100644 index 645fe59..0000000 --- a/mem_mapping_utils.cc +++ /dev/null @@ -1,76 +0,0 @@ -#include <vector> -#include <string.h> -#include <map> -#include "rose.h" -#include "mem_mapping_utils.hh" - -using namespace SageBuilder; -using namespace SageInterface; - -memory_mapping::memory_mapping (bool used, const char * array_name){ - this->mem_used = used; - this->add(array_name); -} - -texture_memory_mapping::texture_memory_mapping(bool used, const char* array_name) : memory_mapping(used, array_name) { } -constant_memory_mapping::constant_memory_mapping(bool used, const char* array_name) : memory_mapping(used, array_name) { } -//texture_memory_mapping::texture_memory_mapping (bool used, const char* array_name, int width, int height) { -// tex_mem_used = used; -// this->add(array_name, width, height); -//} - -void memory_mapping::add(const char * array_name) { - this->mapped_array_name.push_back(std::string(array_name)); - //std::vector<int> ivec = std::vector<int>(); - //dims[std::string(array_name)] = ivec; -} -//void texture_memory_mapping::add(const char* array_name, int width, int height) { -// tex_mapped_array_name.push_back(std::string(array_name)); -// std::vector<int> ivec = std::vector<int>(); -// ivec.push_back(width); -// ivec.push_back(height); -// dims[std::string(array_name)] = ivec; -//} - -bool memory_mapping::is_mem_used(){ - return this->mem_used; -} -bool memory_mapping::is_array_mapped(const char * array_name){ - - for( int i=0; i<mapped_array_name.size(); i++){ - if(!(strcmp(array_name, mapped_array_name[i].c_str()))) - return true; - } - return false; -} -void memory_mapping::set_mapped_symbol(const char * array_name, SgVariableSymbol* sym) { - this->mapped_symbol[std::string(array_name)] = sym; -} -void texture_memory_mapping::set_devptr_symbol(const char * array_name, SgVariableSymbol* sym) { - devptr_symbol[std::string(array_name)] = sym; -} -void memory_mapping::set_vardef(const char* array_name, VarDefs* vardef) { - this->vardefs[std::string(array_name)] = vardef; -} -SgVarRefExp* memory_mapping::get_mapped_symbol_exp(const char * array_name) { - return buildVarRefExp(this->mapped_symbol[std::string(array_name)]); -} -SgVarRefExp* texture_memory_mapping::get_devptr_symbol_exp(const char * array_name) { - return buildVarRefExp(devptr_symbol[std::string(array_name)]); -} -VarDefs* memory_mapping::get_vardef(const char* vardef_name) { - return this->vardefs[std::string(vardef_name)]; -} -//int texture_memory_mapping::get_dims(const char* array_name) { -// return (int)(dims[std::string(array_name)].size()); -//} -//int texture_memory_mapping::get_dim_length(const char* array_name, int dim) { -// return dims[std::string(array_name)][dim]; -//} -memory_mapping::memory_mapping() { - mem_used = false; -} -texture_memory_mapping::texture_memory_mapping() : memory_mapping() { } -constant_memory_mapping::constant_memory_mapping() : memory_mapping() { } - - diff --git a/mem_mapping_utils.hh b/mem_mapping_utils.hh deleted file mode 100644 index 8ff0545..0000000 --- a/mem_mapping_utils.hh +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef MEM_MAPPING_UTILS_HH -#define MEM_MAPPING_UTILS_HH - -#include <vector> -#include <string.h> -#include <map> -#include "rose.h" - -using namespace SageInterface; -using namespace SageBuilder; - -struct VarDefs; - -class memory_mapping { -private: - bool mem_used; - std::vector< std::string > mapped_array_name; - std::map<std::string, SgVariableSymbol*> mapped_symbol; - std::map<std::string, VarDefs*> vardefs; -public: - memory_mapping(); - memory_mapping(bool used, const char* array_name); - void add(const char* array_name); - bool is_mem_used(); - bool is_array_mapped(const char* array_name); - void set_mapped_symbol(const char* array_name, SgVariableSymbol* sym); - void set_vardef(const char* array_name, VarDefs* vardef); - SgVarRefExp* get_mapped_symbol_exp(const char* array_name); - VarDefs* get_vardef(const char* vardef_name); -}; - -//protonu --class introduced to hold texture memory information in one single place -//this might help me get over the weird memory issues I am having with the Loop class -//where someone/something corrupts my memory - -class texture_memory_mapping : public memory_mapping { -private: - std::map<std::string, SgVariableSymbol*> devptr_symbol; - // a hack for multi-dimensional texture mapping - //std::map<std::string, std::vector<int> > dims; -public: - texture_memory_mapping ( bool used, const char * array_name); - //texture_memory_mapping (bool used, const char* array_name, int width, int height); - // this function is a hack to get arround a bug - // void add(const char* array_name, int width, int height); - void set_devptr_symbol(const char * array_name, SgVariableSymbol* sym); - SgVarRefExp* get_devptr_symbol_exp(const char * array_name); - //int get_dim_length(const char* array_name, int dim); - //int get_dims(const char* array_name); - texture_memory_mapping(); -}; - -class constant_memory_mapping : public memory_mapping { -public: - constant_memory_mapping(); - constant_memory_mapping(bool used, const char* array_name); -}; - -#endif diff --git a/omega/INSTALL b/omega/INSTALL deleted file mode 100644 index f3c3558..0000000 --- a/omega/INSTALL +++ /dev/null @@ -1,34 +0,0 @@ -BUILD -===== - -0. Install Rose using the rose installation instructions given. - -1. Edit Makefile.config. Change BUILD_CODEGEN to false if you don't want - CodeGen+ library to be built. - -2. Do "make depend". - -3. Optionally, do "make clean" to remove object files or "make veryclean" - to additionally remove target files. - -4. Do "make". - - -INSTALLATION -============ - -You can use Omega+ and CodeGen+ in source directory since all links -are already created in bin/, lib/ and include/ subdirectories. - -omega/ source directory root - bin/ command line interface "oc" - lib/ libraries "libomega.a" and "libcode_gen.a" - include/ - omega.h main Omega+ header file - omega/ Omega+ header files - basic/ basic utility header files - code_gen/ CodeGen+ header files - -You can also do "make install" to copy necessary files into -/usr/local for root account, or use home directory for other accounts. - diff --git a/omega/README b/omega/README deleted file mode 100644 index 378f4bd..0000000 --- a/omega/README +++ /dev/null @@ -1,96 +0,0 @@ -Omega+ and CodeGen+ 2.2 open source release -See LICENSE file for copyright information. - -Omega+ is a mathematical library for manipulating integer linear -constraints over integer variables in first order logic, and -operations on integer sets and their mappings. CodeGen+ is a code -generation library by scanning the points in a union of polytopes. -A command-line interface to libraries is also included. - - -What is new? -============ - -version 2.2: - * Redesigned polyhedra scanning which generates higher quality code - than before especially for complex set of polyhedra. - * New SimpleHull for hull approximation (deprecate Hull). - * Command line editing and history support in calculator. - -version 2.1: - * Updated "effort" parameter's meaning in MMGenerateCode: value n - (n >= 0, default to 1) means that control overheads are removed - from all n-depth innermost loops. - * Enhanced stride handling in the code generation. - * Support code generation for a set of iteration spaces with different - dimensionality. - * New ConvexRepresentation that reduces the number of conjuncts in a union - (deprecate CheckForConvexPairs and CheckForConvexRepresentation). - * Handle floor/ceiling defined variables cleanly in output code. - * Use namespace omega for the library. - * New closure functions contributed by Klimek Tomasz (R^+ and R^@). - -version 2.0: - * Improved internal code generation interface so that it generates both - string and rose ouput now, and more easily extendable for new compiler - intermediate representations. - * Improved gist function so that integer modular constraints are handled - more gracefully. - * Merge duplicate if-conditions in generated code, which might still miss - a few opportunities due to the way AST is constructed. - * Correct output/input variable substitution for non-unimodular - mapping relations. - * Deprecate Omega's assert/Exit interface. - * Some fixing in calculator's parsing and interactive interface. - -version 1.2 (Omega Project): - * Support for code generation with memory mappings, as described in - Tina Shen's MASPLAS '98 paper. This is available in oc via the - tcodegen function; see examples/calc/mm* for examples. - * Use of the compile-time flags -DSTILL_CHECK_MULT=1 -DNDEBUG turns off - all assertions and chechk _except_ some checks for integer overflow - during variable elimination in the omega core. Unless you know a priori - that overflow cannot occur, you should use this instead of just plain - -DNDEBUG when optimizing. - * You can now use "assertUnsatisfiable relation" to cause oc to quit if - "relation" could be satisfiable. This is mainly useful when running oc - in a script. - -version 1.1 (Omega Project): - * An exact convex hull computation. - * An improved system for handling inexact relations, including taking - upper and lower bounds, checking for subsets, and checking tautologies. - * Better handling of existentially quantified variables: we can now - negate and generate code for sets like: - {[i]: 1 <= i <= n && exists (alpha: i <= 10*alpha <= i+k)}. - * An Example operator, that gives a sample solution to set or relation. - -version 0.90 (Omega Project): - * Initial release. - - -DIRECTORIES -=========== - -omega/ - omega_lib/ source files for the Omega+ library - code_gen/ source files for the CodeGen+ library - omega_calc/ source files for the calculator - examples/ script examples using calculator - c_code/ code examples for using libraries - bin/ links to executables: oc - lib/ links to libraries: libomega.a, libcode_gen.a - include/ links to header files - - -DOCUMENTATION AND QUESTIONS -=========================== - -There are only old documents from the Omega Project under doc/ subdirectory -for now. - -Software website: - http://www.chunchen.info/omega - -For questions, bug reports or suggestions, please contact: - mailto:riverofdreams@gmail.com diff --git a/omega/ROSE_INSTALL.txt b/omega/ROSE_INSTALL.txt deleted file mode 100644 index 79e0c43..0000000 --- a/omega/ROSE_INSTALL.txt +++ /dev/null @@ -1,77 +0,0 @@ -INSTALLATION STEPS: - -1) Please install Boost library version <= 1.45.0 using these instruccions - -1. Download BOOST. -Download BOOST at www.boost.org/users/download. - -2. Untar BOOST. -Type tar -zxf BOOST-[VersionNumber].tar.gz to untar the BOOST distribution. - -3. Create a separate install tree. -Type mkdir installTree to create a location for the install. - -4. Run the bootstrap.sh script. -Type ./bootstrap.sh --prefix=[installTree] - -5. Run bjam. -Type ./bjam install --prefix=[installTree] - - -6) set your BOOSTHOME environment variable to where you've installed BOOST. - -7) Download the latest version of rose from the website. - https://outreach.scidac.gov/frs/?group_id=24 - -8) set the JAVA_HOME environment variable in your ${HOME}/.bashrc - eg. export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk - -9) add this to the LD_LIBRARY_PATH environment variable - - LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386/server:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${BOOSTHOME}/lib - -10) make a new empty directory separate from the downloaded source directory($ROSE_SRC) for rose. - eg. mkdir ${HOME}/compileTree - -11) set your ROSEHOME environment variable in ${HOME}/.bashrc to ${HOME}/compileTree - -12) run the following command from this ${ROSEHOME} - ${ROSE_SRC}/configure --prefix=${ROSEHOME} --with-boost=${BOOSTHOME} --with-boost-libdir=${BOOSTHOME}/lib -with-haskell=no - -13) run the following command to compile: - make install-core - - -14) Install lua version <= 5.1 (usually not necessary to set the LUAHOME environment variable unless - you installed it in a local directory, in which case set LUAHOME to that directory). Lua is only required for - cuda-chill and not plain chill. - -15) If you are installing for CUDA-CHILL set the CUDACHILL environment variable to true - else false - - -16) Install omega by doing the following commands - i) make clean - ii) make veryclean - iii)make depend - iv) make - -17) Set your OMEGAHOME environment variable to the appropriate directory in ${HOME}/.bashrc - -18) Install cuda-chill by doing the following commands - i) make clean - ii) make veryclean - iii)make depend-cuda-chill - iv) make cuda-chill - - else if you are installing just plain chill - export CUDACHILL=false; (remember to rebuild plain omega as well) - i) make clean - ii) make veryclean - iii)make depend - iv) make - -19) Go to examples/cuda-chill and run ../../cuda-chill mm.lua - -20) If running plain Chill go to examples/chill and run ../../chill gemm.script diff --git a/omega/aclocal.m4 b/omega/aclocal.m4 index dfba1f9..ec90bbe 100644 --- a/omega/aclocal.m4 +++ b/omega/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,7 +11,16 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,26 +30,103 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.14' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.14.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -59,7 +145,7 @@ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -85,24 +171,24 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -116,17 +202,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -136,7 +219,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -149,11 +232,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -161,8 +246,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -180,6 +266,16 @@ AC_CACHE_CHECK([dependency style of $depcc], if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -191,34 +287,49 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -251,7 +362,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -261,69 +372,85 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -332,7 +459,7 @@ done # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -342,18 +469,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -366,16 +496,20 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -391,48 +525,122 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi ]) +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -443,18 +651,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -465,17 +674,22 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -489,21 +703,18 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1998-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], -[AC_PREREQ(2.50)dnl +[AC_PREREQ([2.50])dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then @@ -512,14 +723,12 @@ fi]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -527,7 +736,7 @@ AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -537,24 +746,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -564,15 +773,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -580,112 +786,54 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -693,47 +841,126 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -743,9 +970,85 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -753,40 +1056,55 @@ AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -796,75 +1114,114 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + AM_RUN_LOG([cat conftest.dir/file]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/omega/ar-lib b/omega/ar-lib new file mode 100755 index 0000000..fe2301e --- /dev/null +++ b/omega/ar-lib @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2013 Free Software Foundation, Inc. +# Written by Peter Rosin <peda@lysator.liu.se>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <<EOF +Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...] + +Members may be specified in a file named with @FILE. +EOF + exit $? + ;; + -v | --v*) + echo "$me, version $scriptversion" + exit $? + ;; +esac + +if test $# -lt 3; then + func_error "you must specify a program, an action and an archive" +fi + +AR=$1 +shift +while : +do + if test $# -lt 2; then + func_error "you must specify a program, an action and an archive" + fi + case $1 in + -lib | -LIB \ + | -ltcg | -LTCG \ + | -machine* | -MACHINE* \ + | -subsystem* | -SUBSYSTEM* \ + | -verbose | -VERBOSE \ + | -wx* | -WX* ) + AR="$AR $1" + shift + ;; + *) + action=$1 + shift + break + ;; + esac +done +orig_archive=$1 +shift +func_file_conv "$orig_archive" +archive=$file + +# strip leading dash in $action +action=${action#-} + +delete= +extract= +list= +quick= +replace= +index= +create= + +while test -n "$action" +do + case $action in + d*) delete=yes ;; + x*) extract=yes ;; + t*) list=yes ;; + q*) quick=yes ;; + r*) replace=yes ;; + s*) index=yes ;; + S*) ;; # the index is always updated implicitly + c*) create=yes ;; + u*) ;; # TODO: don't ignore the update modifier + v*) ;; # TODO: don't ignore the verbose modifier + *) + func_error "unknown action specified" + ;; + esac + action=${action#?} +done + +case $delete$extract$list$quick$replace,$index in + yes,* | ,yes) + ;; + yesyes*) + func_error "more than one action specified" + ;; + *) + func_error "no action specified" + ;; +esac + +if test -n "$delete"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + for member + do + case $1 in + @*) + func_at_file "${1#@}" -REMOVE "$archive" + ;; + *) + func_file_conv "$1" + $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $? + ;; + esac + done + +elif test -n "$extract"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + if test $# -gt 0; then + for member + do + case $1 in + @*) + func_at_file "${1#@}" -EXTRACT "$archive" + ;; + *) + func_file_conv "$1" + $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $? + ;; + esac + done + else + $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member + do + $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? + done + fi + +elif test -n "$quick$replace"; then + if test ! -f "$orig_archive"; then + if test -z "$create"; then + echo "$me: creating $orig_archive" + fi + orig_archive= + else + orig_archive=$archive + fi + + for member + do + case $1 in + @*) + func_file_conv "${1#@}" + set x "$@" "@$file" + ;; + *) + func_file_conv "$1" + set x "$@" "$file" + ;; + esac + shift + shift + done + + if test -n "$orig_archive"; then + $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $? + else + $AR -NOLOGO -OUT:"$archive" "$@" || exit $? + fi + +elif test -n "$list"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + $AR -NOLOGO -LIST "$archive" || exit $? +fi diff --git a/omega/bin/oc b/omega/bin/oc deleted file mode 120000 index be58273..0000000 --- a/omega/bin/oc +++ /dev/null @@ -1 +0,0 @@ -../omega_calc/obj/oc
\ No newline at end of file diff --git a/omega/code_gen/obj/Makefile.in b/omega/code_gen/obj/Makefile.in index f129ff8..a350281 100644 --- a/omega/code_gen/obj/Makefile.in +++ b/omega/code_gen/obj/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,57 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,7 +77,8 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = code_gen/obj -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -43,35 +86,88 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libcodegen_a_AR = $(AR) $(ARFLAGS) libcodegen_a_LIBADD = -am_libcodegen_a_OBJECTS = libcodegen_a-codegen.$(OBJEXT) \ - libcodegen_a-CG_stringBuilder.$(OBJEXT) \ - libcodegen_a-CG.$(OBJEXT) libcodegen_a-CG_utils.$(OBJEXT) \ - libcodegen_a-rose_attributes.$(OBJEXT) \ - libcodegen_a-CG_roseRepr.$(OBJEXT) \ - libcodegen_a-CG_roseBuilder.$(OBJEXT) +am__dirstamp = $(am__leading_dot)dirstamp +am_libcodegen_a_OBJECTS = ../src/libcodegen_a-codegen.$(OBJEXT) \ + ../src/libcodegen_a-CG_stringBuilder.$(OBJEXT) \ + ../src/libcodegen_a-CG.$(OBJEXT) \ + ../src/libcodegen_a-CG_utils.$(OBJEXT) \ + ../src/libcodegen_a-rose_attributes.$(OBJEXT) \ + ../src/libcodegen_a-CG_roseRepr.$(OBJEXT) \ + ../src/libcodegen_a-CG_roseBuilder.$(OBJEXT) libcodegen_a_OBJECTS = $(am_libcodegen_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libcodegen_a_SOURCES) DIST_SOURCES = $(libcodegen_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -92,6 +188,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -104,6 +201,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -121,12 +219,13 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -134,6 +233,7 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -157,8 +257,12 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ noinst_LIBRARIES = libcodegen.a #if BUILD_ROSE libcodegen_a_SOURCES = ../src/codegen.cc ../src/CG_stringBuilder.cc \ @@ -174,14 +278,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign code_gen/obj/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign code_gen/obj/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign code_gen/obj/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign code_gen/obj/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -199,213 +303,244 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcodegen.a: $(libcodegen_a_OBJECTS) $(libcodegen_a_DEPENDENCIES) - -rm -f libcodegen.a - $(libcodegen_a_AR) libcodegen.a $(libcodegen_a_OBJECTS) $(libcodegen_a_LIBADD) - $(RANLIB) libcodegen.a +../src/$(am__dirstamp): + @$(MKDIR_P) ../src + @: > ../src/$(am__dirstamp) +../src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../src/$(DEPDIR) + @: > ../src/$(DEPDIR)/$(am__dirstamp) +../src/libcodegen_a-codegen.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libcodegen_a-CG_stringBuilder.$(OBJEXT): \ + ../src/$(am__dirstamp) ../src/$(DEPDIR)/$(am__dirstamp) +../src/libcodegen_a-CG.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libcodegen_a-CG_utils.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libcodegen_a-rose_attributes.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libcodegen_a-CG_roseRepr.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libcodegen_a-CG_roseBuilder.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) + +libcodegen.a: $(libcodegen_a_OBJECTS) $(libcodegen_a_DEPENDENCIES) $(EXTRA_libcodegen_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcodegen.a + $(AM_V_AR)$(libcodegen_a_AR) libcodegen.a $(libcodegen_a_OBJECTS) $(libcodegen_a_LIBADD) + $(AM_V_at)$(RANLIB) libcodegen.a mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f ../src/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcodegen_a-CG.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcodegen_a-CG_roseBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcodegen_a-CG_roseRepr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcodegen_a-CG_stringBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcodegen_a-CG_utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcodegen_a-codegen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcodegen_a-rose_attributes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libcodegen_a-CG.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libcodegen_a-CG_roseBuilder.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libcodegen_a-CG_roseRepr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libcodegen_a-CG_stringBuilder.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libcodegen_a-CG_utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libcodegen_a-codegen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libcodegen_a-rose_attributes.Po@am__quote@ .cc.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -libcodegen_a-codegen.o: ../src/codegen.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-codegen.o -MD -MP -MF "$(DEPDIR)/libcodegen_a-codegen.Tpo" -c -o libcodegen_a-codegen.o `test -f '../src/codegen.cc' || echo '$(srcdir)/'`../src/codegen.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-codegen.Tpo" "$(DEPDIR)/libcodegen_a-codegen.Po"; else rm -f "$(DEPDIR)/libcodegen_a-codegen.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/codegen.cc' object='libcodegen_a-codegen.o' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-codegen.o: ../src/codegen.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-codegen.o -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-codegen.Tpo -c -o ../src/libcodegen_a-codegen.o `test -f '../src/codegen.cc' || echo '$(srcdir)/'`../src/codegen.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-codegen.Tpo ../src/$(DEPDIR)/libcodegen_a-codegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/codegen.cc' object='../src/libcodegen_a-codegen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-codegen.o `test -f '../src/codegen.cc' || echo '$(srcdir)/'`../src/codegen.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-codegen.o `test -f '../src/codegen.cc' || echo '$(srcdir)/'`../src/codegen.cc -libcodegen_a-codegen.obj: ../src/codegen.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-codegen.obj -MD -MP -MF "$(DEPDIR)/libcodegen_a-codegen.Tpo" -c -o libcodegen_a-codegen.obj `if test -f '../src/codegen.cc'; then $(CYGPATH_W) '../src/codegen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/codegen.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-codegen.Tpo" "$(DEPDIR)/libcodegen_a-codegen.Po"; else rm -f "$(DEPDIR)/libcodegen_a-codegen.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/codegen.cc' object='libcodegen_a-codegen.obj' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-codegen.obj: ../src/codegen.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-codegen.obj -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-codegen.Tpo -c -o ../src/libcodegen_a-codegen.obj `if test -f '../src/codegen.cc'; then $(CYGPATH_W) '../src/codegen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/codegen.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-codegen.Tpo ../src/$(DEPDIR)/libcodegen_a-codegen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/codegen.cc' object='../src/libcodegen_a-codegen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-codegen.obj `if test -f '../src/codegen.cc'; then $(CYGPATH_W) '../src/codegen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/codegen.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-codegen.obj `if test -f '../src/codegen.cc'; then $(CYGPATH_W) '../src/codegen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/codegen.cc'; fi` -libcodegen_a-CG_stringBuilder.o: ../src/CG_stringBuilder.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_stringBuilder.o -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo" -c -o libcodegen_a-CG_stringBuilder.o `test -f '../src/CG_stringBuilder.cc' || echo '$(srcdir)/'`../src/CG_stringBuilder.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo" "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_stringBuilder.cc' object='libcodegen_a-CG_stringBuilder.o' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_stringBuilder.o: ../src/CG_stringBuilder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_stringBuilder.o -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo -c -o ../src/libcodegen_a-CG_stringBuilder.o `test -f '../src/CG_stringBuilder.cc' || echo '$(srcdir)/'`../src/CG_stringBuilder.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_stringBuilder.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_stringBuilder.cc' object='../src/libcodegen_a-CG_stringBuilder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_stringBuilder.o `test -f '../src/CG_stringBuilder.cc' || echo '$(srcdir)/'`../src/CG_stringBuilder.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_stringBuilder.o `test -f '../src/CG_stringBuilder.cc' || echo '$(srcdir)/'`../src/CG_stringBuilder.cc -libcodegen_a-CG_stringBuilder.obj: ../src/CG_stringBuilder.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_stringBuilder.obj -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo" -c -o libcodegen_a-CG_stringBuilder.obj `if test -f '../src/CG_stringBuilder.cc'; then $(CYGPATH_W) '../src/CG_stringBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_stringBuilder.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo" "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_stringBuilder.cc' object='libcodegen_a-CG_stringBuilder.obj' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_stringBuilder.obj: ../src/CG_stringBuilder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_stringBuilder.obj -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo -c -o ../src/libcodegen_a-CG_stringBuilder.obj `if test -f '../src/CG_stringBuilder.cc'; then $(CYGPATH_W) '../src/CG_stringBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_stringBuilder.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_stringBuilder.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_stringBuilder.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_stringBuilder.cc' object='../src/libcodegen_a-CG_stringBuilder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_stringBuilder.obj `if test -f '../src/CG_stringBuilder.cc'; then $(CYGPATH_W) '../src/CG_stringBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_stringBuilder.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_stringBuilder.obj `if test -f '../src/CG_stringBuilder.cc'; then $(CYGPATH_W) '../src/CG_stringBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_stringBuilder.cc'; fi` -libcodegen_a-CG.o: ../src/CG.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG.o -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG.Tpo" -c -o libcodegen_a-CG.o `test -f '../src/CG.cc' || echo '$(srcdir)/'`../src/CG.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG.Tpo" "$(DEPDIR)/libcodegen_a-CG.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG.cc' object='libcodegen_a-CG.o' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG.o: ../src/CG.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG.o -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG.Tpo -c -o ../src/libcodegen_a-CG.o `test -f '../src/CG.cc' || echo '$(srcdir)/'`../src/CG.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG.Tpo ../src/$(DEPDIR)/libcodegen_a-CG.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG.cc' object='../src/libcodegen_a-CG.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG.o `test -f '../src/CG.cc' || echo '$(srcdir)/'`../src/CG.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG.o `test -f '../src/CG.cc' || echo '$(srcdir)/'`../src/CG.cc -libcodegen_a-CG.obj: ../src/CG.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG.obj -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG.Tpo" -c -o libcodegen_a-CG.obj `if test -f '../src/CG.cc'; then $(CYGPATH_W) '../src/CG.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG.Tpo" "$(DEPDIR)/libcodegen_a-CG.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG.cc' object='libcodegen_a-CG.obj' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG.obj: ../src/CG.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG.obj -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG.Tpo -c -o ../src/libcodegen_a-CG.obj `if test -f '../src/CG.cc'; then $(CYGPATH_W) '../src/CG.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG.Tpo ../src/$(DEPDIR)/libcodegen_a-CG.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG.cc' object='../src/libcodegen_a-CG.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG.obj `if test -f '../src/CG.cc'; then $(CYGPATH_W) '../src/CG.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG.obj `if test -f '../src/CG.cc'; then $(CYGPATH_W) '../src/CG.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG.cc'; fi` -libcodegen_a-CG_utils.o: ../src/CG_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_utils.o -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_utils.Tpo" -c -o libcodegen_a-CG_utils.o `test -f '../src/CG_utils.cc' || echo '$(srcdir)/'`../src/CG_utils.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_utils.Tpo" "$(DEPDIR)/libcodegen_a-CG_utils.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_utils.cc' object='libcodegen_a-CG_utils.o' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_utils.o: ../src/CG_utils.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_utils.o -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_utils.Tpo -c -o ../src/libcodegen_a-CG_utils.o `test -f '../src/CG_utils.cc' || echo '$(srcdir)/'`../src/CG_utils.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_utils.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_utils.cc' object='../src/libcodegen_a-CG_utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_utils.o `test -f '../src/CG_utils.cc' || echo '$(srcdir)/'`../src/CG_utils.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_utils.o `test -f '../src/CG_utils.cc' || echo '$(srcdir)/'`../src/CG_utils.cc -libcodegen_a-CG_utils.obj: ../src/CG_utils.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_utils.obj -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_utils.Tpo" -c -o libcodegen_a-CG_utils.obj `if test -f '../src/CG_utils.cc'; then $(CYGPATH_W) '../src/CG_utils.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_utils.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_utils.Tpo" "$(DEPDIR)/libcodegen_a-CG_utils.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_utils.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_utils.cc' object='libcodegen_a-CG_utils.obj' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_utils.obj: ../src/CG_utils.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_utils.obj -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_utils.Tpo -c -o ../src/libcodegen_a-CG_utils.obj `if test -f '../src/CG_utils.cc'; then $(CYGPATH_W) '../src/CG_utils.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_utils.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_utils.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_utils.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_utils.cc' object='../src/libcodegen_a-CG_utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_utils.obj `if test -f '../src/CG_utils.cc'; then $(CYGPATH_W) '../src/CG_utils.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_utils.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_utils.obj `if test -f '../src/CG_utils.cc'; then $(CYGPATH_W) '../src/CG_utils.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_utils.cc'; fi` -libcodegen_a-rose_attributes.o: ../src/rose_attributes.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-rose_attributes.o -MD -MP -MF "$(DEPDIR)/libcodegen_a-rose_attributes.Tpo" -c -o libcodegen_a-rose_attributes.o `test -f '../src/rose_attributes.cc' || echo '$(srcdir)/'`../src/rose_attributes.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-rose_attributes.Tpo" "$(DEPDIR)/libcodegen_a-rose_attributes.Po"; else rm -f "$(DEPDIR)/libcodegen_a-rose_attributes.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/rose_attributes.cc' object='libcodegen_a-rose_attributes.o' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-rose_attributes.o: ../src/rose_attributes.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-rose_attributes.o -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-rose_attributes.Tpo -c -o ../src/libcodegen_a-rose_attributes.o `test -f '../src/rose_attributes.cc' || echo '$(srcdir)/'`../src/rose_attributes.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-rose_attributes.Tpo ../src/$(DEPDIR)/libcodegen_a-rose_attributes.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/rose_attributes.cc' object='../src/libcodegen_a-rose_attributes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-rose_attributes.o `test -f '../src/rose_attributes.cc' || echo '$(srcdir)/'`../src/rose_attributes.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-rose_attributes.o `test -f '../src/rose_attributes.cc' || echo '$(srcdir)/'`../src/rose_attributes.cc -libcodegen_a-rose_attributes.obj: ../src/rose_attributes.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-rose_attributes.obj -MD -MP -MF "$(DEPDIR)/libcodegen_a-rose_attributes.Tpo" -c -o libcodegen_a-rose_attributes.obj `if test -f '../src/rose_attributes.cc'; then $(CYGPATH_W) '../src/rose_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/../src/rose_attributes.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-rose_attributes.Tpo" "$(DEPDIR)/libcodegen_a-rose_attributes.Po"; else rm -f "$(DEPDIR)/libcodegen_a-rose_attributes.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/rose_attributes.cc' object='libcodegen_a-rose_attributes.obj' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-rose_attributes.obj: ../src/rose_attributes.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-rose_attributes.obj -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-rose_attributes.Tpo -c -o ../src/libcodegen_a-rose_attributes.obj `if test -f '../src/rose_attributes.cc'; then $(CYGPATH_W) '../src/rose_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/../src/rose_attributes.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-rose_attributes.Tpo ../src/$(DEPDIR)/libcodegen_a-rose_attributes.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/rose_attributes.cc' object='../src/libcodegen_a-rose_attributes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-rose_attributes.obj `if test -f '../src/rose_attributes.cc'; then $(CYGPATH_W) '../src/rose_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/../src/rose_attributes.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-rose_attributes.obj `if test -f '../src/rose_attributes.cc'; then $(CYGPATH_W) '../src/rose_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/../src/rose_attributes.cc'; fi` -libcodegen_a-CG_roseRepr.o: ../src/CG_roseRepr.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_roseRepr.o -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo" -c -o libcodegen_a-CG_roseRepr.o `test -f '../src/CG_roseRepr.cc' || echo '$(srcdir)/'`../src/CG_roseRepr.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo" "$(DEPDIR)/libcodegen_a-CG_roseRepr.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_roseRepr.cc' object='libcodegen_a-CG_roseRepr.o' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_roseRepr.o: ../src/CG_roseRepr.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_roseRepr.o -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo -c -o ../src/libcodegen_a-CG_roseRepr.o `test -f '../src/CG_roseRepr.cc' || echo '$(srcdir)/'`../src/CG_roseRepr.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_roseRepr.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_roseRepr.cc' object='../src/libcodegen_a-CG_roseRepr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_roseRepr.o `test -f '../src/CG_roseRepr.cc' || echo '$(srcdir)/'`../src/CG_roseRepr.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_roseRepr.o `test -f '../src/CG_roseRepr.cc' || echo '$(srcdir)/'`../src/CG_roseRepr.cc -libcodegen_a-CG_roseRepr.obj: ../src/CG_roseRepr.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_roseRepr.obj -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo" -c -o libcodegen_a-CG_roseRepr.obj `if test -f '../src/CG_roseRepr.cc'; then $(CYGPATH_W) '../src/CG_roseRepr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseRepr.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo" "$(DEPDIR)/libcodegen_a-CG_roseRepr.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_roseRepr.cc' object='libcodegen_a-CG_roseRepr.obj' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_roseRepr.obj: ../src/CG_roseRepr.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_roseRepr.obj -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo -c -o ../src/libcodegen_a-CG_roseRepr.obj `if test -f '../src/CG_roseRepr.cc'; then $(CYGPATH_W) '../src/CG_roseRepr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseRepr.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_roseRepr.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_roseRepr.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_roseRepr.cc' object='../src/libcodegen_a-CG_roseRepr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_roseRepr.obj `if test -f '../src/CG_roseRepr.cc'; then $(CYGPATH_W) '../src/CG_roseRepr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseRepr.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_roseRepr.obj `if test -f '../src/CG_roseRepr.cc'; then $(CYGPATH_W) '../src/CG_roseRepr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseRepr.cc'; fi` -libcodegen_a-CG_roseBuilder.o: ../src/CG_roseBuilder.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_roseBuilder.o -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo" -c -o libcodegen_a-CG_roseBuilder.o `test -f '../src/CG_roseBuilder.cc' || echo '$(srcdir)/'`../src/CG_roseBuilder.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo" "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_roseBuilder.cc' object='libcodegen_a-CG_roseBuilder.o' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_roseBuilder.o: ../src/CG_roseBuilder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_roseBuilder.o -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo -c -o ../src/libcodegen_a-CG_roseBuilder.o `test -f '../src/CG_roseBuilder.cc' || echo '$(srcdir)/'`../src/CG_roseBuilder.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_roseBuilder.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_roseBuilder.cc' object='../src/libcodegen_a-CG_roseBuilder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_roseBuilder.o `test -f '../src/CG_roseBuilder.cc' || echo '$(srcdir)/'`../src/CG_roseBuilder.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_roseBuilder.o `test -f '../src/CG_roseBuilder.cc' || echo '$(srcdir)/'`../src/CG_roseBuilder.cc -libcodegen_a-CG_roseBuilder.obj: ../src/CG_roseBuilder.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcodegen_a-CG_roseBuilder.obj -MD -MP -MF "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo" -c -o libcodegen_a-CG_roseBuilder.obj `if test -f '../src/CG_roseBuilder.cc'; then $(CYGPATH_W) '../src/CG_roseBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseBuilder.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo" "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Po"; else rm -f "$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/CG_roseBuilder.cc' object='libcodegen_a-CG_roseBuilder.obj' libtool=no @AMDEPBACKSLASH@ +../src/libcodegen_a-CG_roseBuilder.obj: ../src/CG_roseBuilder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libcodegen_a-CG_roseBuilder.obj -MD -MP -MF ../src/$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo -c -o ../src/libcodegen_a-CG_roseBuilder.obj `if test -f '../src/CG_roseBuilder.cc'; then $(CYGPATH_W) '../src/CG_roseBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseBuilder.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libcodegen_a-CG_roseBuilder.Tpo ../src/$(DEPDIR)/libcodegen_a-CG_roseBuilder.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/CG_roseBuilder.cc' object='../src/libcodegen_a-CG_roseBuilder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcodegen_a-CG_roseBuilder.obj `if test -f '../src/CG_roseBuilder.cc'; then $(CYGPATH_W) '../src/CG_roseBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseBuilder.cc'; fi` -uninstall-info-am: - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcodegen_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libcodegen_a-CG_roseBuilder.obj `if test -f '../src/CG_roseBuilder.cc'; then $(CYGPATH_W) '../src/CG_roseBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/../src/CG_roseBuilder.cc'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -423,16 +558,24 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f ../src/$(DEPDIR)/$(am__dirstamp) + -rm -f ../src/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -442,7 +585,7 @@ clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../src/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -453,22 +596,42 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../src/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -484,20 +647,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am #endif + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/omega/compile b/omega/compile new file mode 100755 index 0000000..531136b --- /dev/null +++ b/omega/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/omega/configure b/omega/configure index 7233b94..3a9175c 100755 --- a/omega/configure +++ b/omega/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for omega 0.1.0. +# Generated by GNU Autoconf 2.69 for omega 0.1.0. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,21 +235,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -327,6 +355,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -448,6 +484,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -482,16 +522,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -503,28 +543,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -561,7 +581,9 @@ PACKAGE_STRING='omega 0.1.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' -ac_subst_vars='LTLIBOBJS +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS BOOSTHOME ROSEHOME @@ -575,9 +597,12 @@ ac_ct_CXX CXXFLAGS CXX LEXLIB +LEX_OUTPUT_ROOT +LEX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -591,9 +616,13 @@ CPPFLAGS LDFLAGS CFLAGS CC -LEX_OUTPUT_ROOT -LEX +ac_ct_AR +AR CCLD +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -601,6 +630,7 @@ am__leading_dot SET_MAKE AWK mkdir_p +MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh @@ -612,6 +642,7 @@ ACLOCAL VERSION PACKAGE CYGPATH_W +am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -656,6 +687,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_dependency_tracking with_rose with_boost @@ -1128,8 +1160,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1289,8 +1319,12 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1385,9 +1419,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF omega configure 0.1.0 -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1463,7 +1497,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1524,7 +1558,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by omega $as_me 0.1.0, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1900,7 +1934,8 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version="1.9" +am__api_version='1.14' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1938,7 +1973,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1996,32 +2031,50 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2033,6 +2086,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2046,48 +2109,173 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else - mkdir_p='$(install_sh) -d' + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP fi +else + STRIP="$ac_cv_prog_STRIP" +fi + fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do @@ -2107,7 +2295,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2171,10 +2359,53 @@ else fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi fi # test whether we have cygpath @@ -2217,119 +2448,70 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +mkdir_p='$(MKDIR_P)' -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. -AMTAR=${AMTAR-"${am_missing_run}tar"} -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi ### Use the C++ compiler for linking (C is default) ### @@ -2347,7 +2529,7 @@ ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -2358,24 +2540,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi @@ -2391,10 +2573,9 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -2403,7 +2584,6 @@ else fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2426,7 +2606,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2466,7 +2646,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2519,7 +2699,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2560,7 +2740,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2618,7 +2798,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2662,7 +2842,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3108,8 +3288,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3194,6 +3373,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -3205,8 +3443,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3224,6 +3463,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3235,34 +3479,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3290,9 +3549,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3304,6 +3561,177 @@ fi +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -3322,7 +3750,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3354,7 +3782,8 @@ a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } -e { yyless (input () != 0); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% @@ -3487,7 +3916,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3527,7 +3956,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3580,7 +4009,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3621,7 +4050,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3679,7 +4108,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3723,7 +4152,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3919,8 +4348,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4005,6 +4433,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4016,8 +4503,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4035,6 +4523,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4046,34 +4539,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4101,9 +4609,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -4142,7 +4648,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4186,7 +4692,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4382,8 +4888,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4401,6 +4908,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4412,34 +4924,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4467,9 +4994,7 @@ fi $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= @@ -4497,7 +5022,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4537,7 +5062,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4590,7 +5115,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4760,6 +5285,22 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -5074,16 +5615,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -5143,28 +5684,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5186,7 +5715,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by omega $as_me 0.1.0, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5252,16 +5781,17 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ omega config.status 0.1.0 -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -5345,7 +5875,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -5832,6 +6362,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -5886,6 +6421,7 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ @@ -5931,21 +6467,22 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - "$ac_file" | "$ac_file":* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -5972,17 +6509,28 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ @@ -6005,28 +6553,26 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ @@ -6049,11 +6595,12 @@ $as_echo X"$file" | q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ;; esac diff --git a/omega/configure.ac b/omega/configure.ac index 35e7581..19aca81 100644 --- a/omega/configure.ac +++ b/omega/configure.ac @@ -2,12 +2,13 @@ ### If it's not 0.1.0, feel free to change it AC_INIT([omega],[0.1.0]) AC_CONFIG_AUX_DIR([.]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) ### Use the C++ compiler for linking (C is default) ### AC_SUBST([CCLD],["$""(CXX)"]) AC_DEFINE([OMEGA_VERSION],["0.1.0"],[Omega version]) +AM_PROG_AR AM_PROG_LEX AC_PROG_CC AC_PROG_CXX diff --git a/omega/omega_calc/obj/Makefile.in b/omega/omega_calc/obj/Makefile.in index dd02261..b7a1e8a 100644 --- a/omega/omega_calc/obj/Makefile.in +++ b/omega/omega_calc/obj/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,57 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,7 +78,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : noinst_PROGRAMS = oc$(EXEEXT) subdir = omega_calc/obj -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,29 +87,81 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) -am_oc_OBJECTS = oc-AST.$(OBJEXT) oc-myflex.$(OBJEXT) \ - oc-lex.yy.$(OBJEXT) oc-parser.tab.$(OBJEXT) +am__dirstamp = $(am__leading_dot)dirstamp +am_oc_OBJECTS = $(SRCDIR)/oc-AST.$(OBJEXT) \ + $(SRCDIR)/oc-myflex.$(OBJEXT) $(SRCDIR)/oc-lex.yy.$(OBJEXT) \ + $(SRCDIR)/oc-parser.tab.$(OBJEXT) oc_OBJECTS = $(am_oc_OBJECTS) am__DEPENDENCIES_1 = oc_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include +oc_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(oc_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(oc_SOURCES) DIST_SOURCES = $(oc_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -87,6 +182,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -99,6 +195,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -116,12 +213,13 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -129,6 +227,7 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -152,8 +251,12 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ SRCDIR = ../src build_date = "\"`date +%m/%d/%Y`\"" BUILT_SOURCES = $(SRCDIR)/lex.yy.cc $(SRCDIR)/parser.tab.cc @@ -179,14 +282,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign omega_calc/obj/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign omega_calc/obj/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign omega_calc/obj/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign omega_calc/obj/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -204,167 +307,192 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) -oc$(EXEEXT): $(oc_OBJECTS) $(oc_DEPENDENCIES) +$(SRCDIR)/$(am__dirstamp): + @$(MKDIR_P) $(SRCDIR) + @: > $(SRCDIR)/$(am__dirstamp) +$(SRCDIR)/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) $(SRCDIR)/$(DEPDIR) + @: > $(SRCDIR)/$(DEPDIR)/$(am__dirstamp) +$(SRCDIR)/oc-AST.$(OBJEXT): $(SRCDIR)/$(am__dirstamp) \ + $(SRCDIR)/$(DEPDIR)/$(am__dirstamp) +$(SRCDIR)/oc-myflex.$(OBJEXT): $(SRCDIR)/$(am__dirstamp) \ + $(SRCDIR)/$(DEPDIR)/$(am__dirstamp) +$(SRCDIR)/oc-lex.yy.$(OBJEXT): $(SRCDIR)/$(am__dirstamp) \ + $(SRCDIR)/$(DEPDIR)/$(am__dirstamp) +$(SRCDIR)/oc-parser.tab.$(OBJEXT): $(SRCDIR)/$(am__dirstamp) \ + $(SRCDIR)/$(DEPDIR)/$(am__dirstamp) + +oc$(EXEEXT): $(oc_OBJECTS) $(oc_DEPENDENCIES) $(EXTRA_oc_DEPENDENCIES) @rm -f oc$(EXEEXT) - $(CXXLINK) $(oc_LDFLAGS) $(oc_OBJECTS) $(oc_LDADD) $(LIBS) + $(AM_V_CXXLD)$(oc_LINK) $(oc_OBJECTS) $(oc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f $(SRCDIR)/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oc-AST.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oc-lex.yy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oc-myflex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oc-parser.tab.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(SRCDIR)/$(DEPDIR)/oc-AST.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(SRCDIR)/$(DEPDIR)/oc-lex.yy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(SRCDIR)/$(DEPDIR)/oc-myflex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(SRCDIR)/$(DEPDIR)/oc-parser.tab.Po@am__quote@ .cc.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -oc-AST.o: $(SRCDIR)/AST.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-AST.o -MD -MP -MF "$(DEPDIR)/oc-AST.Tpo" -c -o oc-AST.o `test -f '$(SRCDIR)/AST.cc' || echo '$(srcdir)/'`$(SRCDIR)/AST.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-AST.Tpo" "$(DEPDIR)/oc-AST.Po"; else rm -f "$(DEPDIR)/oc-AST.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/AST.cc' object='oc-AST.o' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-AST.o: $(SRCDIR)/AST.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-AST.o -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-AST.Tpo -c -o $(SRCDIR)/oc-AST.o `test -f '$(SRCDIR)/AST.cc' || echo '$(srcdir)/'`$(SRCDIR)/AST.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-AST.Tpo $(SRCDIR)/$(DEPDIR)/oc-AST.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/AST.cc' object='$(SRCDIR)/oc-AST.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-AST.o `test -f '$(SRCDIR)/AST.cc' || echo '$(srcdir)/'`$(SRCDIR)/AST.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-AST.o `test -f '$(SRCDIR)/AST.cc' || echo '$(srcdir)/'`$(SRCDIR)/AST.cc -oc-AST.obj: $(SRCDIR)/AST.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-AST.obj -MD -MP -MF "$(DEPDIR)/oc-AST.Tpo" -c -o oc-AST.obj `if test -f '$(SRCDIR)/AST.cc'; then $(CYGPATH_W) '$(SRCDIR)/AST.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/AST.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-AST.Tpo" "$(DEPDIR)/oc-AST.Po"; else rm -f "$(DEPDIR)/oc-AST.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/AST.cc' object='oc-AST.obj' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-AST.obj: $(SRCDIR)/AST.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-AST.obj -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-AST.Tpo -c -o $(SRCDIR)/oc-AST.obj `if test -f '$(SRCDIR)/AST.cc'; then $(CYGPATH_W) '$(SRCDIR)/AST.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/AST.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-AST.Tpo $(SRCDIR)/$(DEPDIR)/oc-AST.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/AST.cc' object='$(SRCDIR)/oc-AST.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-AST.obj `if test -f '$(SRCDIR)/AST.cc'; then $(CYGPATH_W) '$(SRCDIR)/AST.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/AST.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-AST.obj `if test -f '$(SRCDIR)/AST.cc'; then $(CYGPATH_W) '$(SRCDIR)/AST.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/AST.cc'; fi` -oc-myflex.o: $(SRCDIR)/myflex.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-myflex.o -MD -MP -MF "$(DEPDIR)/oc-myflex.Tpo" -c -o oc-myflex.o `test -f '$(SRCDIR)/myflex.cc' || echo '$(srcdir)/'`$(SRCDIR)/myflex.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-myflex.Tpo" "$(DEPDIR)/oc-myflex.Po"; else rm -f "$(DEPDIR)/oc-myflex.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/myflex.cc' object='oc-myflex.o' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-myflex.o: $(SRCDIR)/myflex.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-myflex.o -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-myflex.Tpo -c -o $(SRCDIR)/oc-myflex.o `test -f '$(SRCDIR)/myflex.cc' || echo '$(srcdir)/'`$(SRCDIR)/myflex.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-myflex.Tpo $(SRCDIR)/$(DEPDIR)/oc-myflex.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/myflex.cc' object='$(SRCDIR)/oc-myflex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-myflex.o `test -f '$(SRCDIR)/myflex.cc' || echo '$(srcdir)/'`$(SRCDIR)/myflex.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-myflex.o `test -f '$(SRCDIR)/myflex.cc' || echo '$(srcdir)/'`$(SRCDIR)/myflex.cc -oc-myflex.obj: $(SRCDIR)/myflex.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-myflex.obj -MD -MP -MF "$(DEPDIR)/oc-myflex.Tpo" -c -o oc-myflex.obj `if test -f '$(SRCDIR)/myflex.cc'; then $(CYGPATH_W) '$(SRCDIR)/myflex.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/myflex.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-myflex.Tpo" "$(DEPDIR)/oc-myflex.Po"; else rm -f "$(DEPDIR)/oc-myflex.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/myflex.cc' object='oc-myflex.obj' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-myflex.obj: $(SRCDIR)/myflex.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-myflex.obj -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-myflex.Tpo -c -o $(SRCDIR)/oc-myflex.obj `if test -f '$(SRCDIR)/myflex.cc'; then $(CYGPATH_W) '$(SRCDIR)/myflex.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/myflex.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-myflex.Tpo $(SRCDIR)/$(DEPDIR)/oc-myflex.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/myflex.cc' object='$(SRCDIR)/oc-myflex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-myflex.obj `if test -f '$(SRCDIR)/myflex.cc'; then $(CYGPATH_W) '$(SRCDIR)/myflex.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/myflex.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-myflex.obj `if test -f '$(SRCDIR)/myflex.cc'; then $(CYGPATH_W) '$(SRCDIR)/myflex.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/myflex.cc'; fi` -oc-lex.yy.o: $(SRCDIR)/lex.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-lex.yy.o -MD -MP -MF "$(DEPDIR)/oc-lex.yy.Tpo" -c -o oc-lex.yy.o `test -f '$(SRCDIR)/lex.yy.cc' || echo '$(srcdir)/'`$(SRCDIR)/lex.yy.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-lex.yy.Tpo" "$(DEPDIR)/oc-lex.yy.Po"; else rm -f "$(DEPDIR)/oc-lex.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/lex.yy.cc' object='oc-lex.yy.o' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-lex.yy.o: $(SRCDIR)/lex.yy.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-lex.yy.o -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-lex.yy.Tpo -c -o $(SRCDIR)/oc-lex.yy.o `test -f '$(SRCDIR)/lex.yy.cc' || echo '$(srcdir)/'`$(SRCDIR)/lex.yy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-lex.yy.Tpo $(SRCDIR)/$(DEPDIR)/oc-lex.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/lex.yy.cc' object='$(SRCDIR)/oc-lex.yy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-lex.yy.o `test -f '$(SRCDIR)/lex.yy.cc' || echo '$(srcdir)/'`$(SRCDIR)/lex.yy.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-lex.yy.o `test -f '$(SRCDIR)/lex.yy.cc' || echo '$(srcdir)/'`$(SRCDIR)/lex.yy.cc -oc-lex.yy.obj: $(SRCDIR)/lex.yy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-lex.yy.obj -MD -MP -MF "$(DEPDIR)/oc-lex.yy.Tpo" -c -o oc-lex.yy.obj `if test -f '$(SRCDIR)/lex.yy.cc'; then $(CYGPATH_W) '$(SRCDIR)/lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/lex.yy.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-lex.yy.Tpo" "$(DEPDIR)/oc-lex.yy.Po"; else rm -f "$(DEPDIR)/oc-lex.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/lex.yy.cc' object='oc-lex.yy.obj' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-lex.yy.obj: $(SRCDIR)/lex.yy.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-lex.yy.obj -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-lex.yy.Tpo -c -o $(SRCDIR)/oc-lex.yy.obj `if test -f '$(SRCDIR)/lex.yy.cc'; then $(CYGPATH_W) '$(SRCDIR)/lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/lex.yy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-lex.yy.Tpo $(SRCDIR)/$(DEPDIR)/oc-lex.yy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/lex.yy.cc' object='$(SRCDIR)/oc-lex.yy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-lex.yy.obj `if test -f '$(SRCDIR)/lex.yy.cc'; then $(CYGPATH_W) '$(SRCDIR)/lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/lex.yy.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-lex.yy.obj `if test -f '$(SRCDIR)/lex.yy.cc'; then $(CYGPATH_W) '$(SRCDIR)/lex.yy.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/lex.yy.cc'; fi` -oc-parser.tab.o: $(SRCDIR)/parser.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-parser.tab.o -MD -MP -MF "$(DEPDIR)/oc-parser.tab.Tpo" -c -o oc-parser.tab.o `test -f '$(SRCDIR)/parser.tab.cc' || echo '$(srcdir)/'`$(SRCDIR)/parser.tab.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-parser.tab.Tpo" "$(DEPDIR)/oc-parser.tab.Po"; else rm -f "$(DEPDIR)/oc-parser.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/parser.tab.cc' object='oc-parser.tab.o' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-parser.tab.o: $(SRCDIR)/parser.tab.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-parser.tab.o -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-parser.tab.Tpo -c -o $(SRCDIR)/oc-parser.tab.o `test -f '$(SRCDIR)/parser.tab.cc' || echo '$(srcdir)/'`$(SRCDIR)/parser.tab.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-parser.tab.Tpo $(SRCDIR)/$(DEPDIR)/oc-parser.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/parser.tab.cc' object='$(SRCDIR)/oc-parser.tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-parser.tab.o `test -f '$(SRCDIR)/parser.tab.cc' || echo '$(srcdir)/'`$(SRCDIR)/parser.tab.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-parser.tab.o `test -f '$(SRCDIR)/parser.tab.cc' || echo '$(srcdir)/'`$(SRCDIR)/parser.tab.cc -oc-parser.tab.obj: $(SRCDIR)/parser.tab.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT oc-parser.tab.obj -MD -MP -MF "$(DEPDIR)/oc-parser.tab.Tpo" -c -o oc-parser.tab.obj `if test -f '$(SRCDIR)/parser.tab.cc'; then $(CYGPATH_W) '$(SRCDIR)/parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/parser.tab.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/oc-parser.tab.Tpo" "$(DEPDIR)/oc-parser.tab.Po"; else rm -f "$(DEPDIR)/oc-parser.tab.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SRCDIR)/parser.tab.cc' object='oc-parser.tab.obj' libtool=no @AMDEPBACKSLASH@ +$(SRCDIR)/oc-parser.tab.obj: $(SRCDIR)/parser.tab.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT $(SRCDIR)/oc-parser.tab.obj -MD -MP -MF $(SRCDIR)/$(DEPDIR)/oc-parser.tab.Tpo -c -o $(SRCDIR)/oc-parser.tab.obj `if test -f '$(SRCDIR)/parser.tab.cc'; then $(CYGPATH_W) '$(SRCDIR)/parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/parser.tab.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(SRCDIR)/$(DEPDIR)/oc-parser.tab.Tpo $(SRCDIR)/$(DEPDIR)/oc-parser.tab.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(SRCDIR)/parser.tab.cc' object='$(SRCDIR)/oc-parser.tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o oc-parser.tab.obj `if test -f '$(SRCDIR)/parser.tab.cc'; then $(CYGPATH_W) '$(SRCDIR)/parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/parser.tab.cc'; fi` -uninstall-info-am: - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(oc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o $(SRCDIR)/oc-parser.tab.obj `if test -f '$(SRCDIR)/parser.tab.cc'; then $(CYGPATH_W) '$(SRCDIR)/parser.tab.cc'; else $(CYGPATH_W) '$(srcdir)/$(SRCDIR)/parser.tab.cc'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -384,16 +512,24 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(SRCDIR)/$(DEPDIR)/$(am__dirstamp)" || rm -f $(SRCDIR)/$(DEPDIR)/$(am__dirstamp) + -test -z "$(SRCDIR)/$(am__dirstamp)" || rm -f $(SRCDIR)/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -404,7 +540,7 @@ clean: clean-am clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(SRCDIR)/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -415,22 +551,42 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(SRCDIR)/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -446,18 +602,22 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am $(SRCDIR)/lex.yy.cc: $(SRCDIR)/parser.tab.cc $(SRCDIR)/parser.ll @@ -465,6 +625,7 @@ $(SRCDIR)/lex.yy.cc: $(SRCDIR)/parser.tab.cc $(SRCDIR)/parser.ll $(SRCDIR)/parser.tab.cc: bison -t -d -o $(SRCDIR)/parser.tab.cc $(SRCDIR)/parser.yy + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/omega/omega_lib/obj/Makefile.in b/omega/omega_lib/obj/Makefile.in index 2050fa7..0bc1d1f 100644 --- a/omega/omega_lib/obj/Makefile.in +++ b/omega/omega_lib/obj/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,57 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,7 +77,8 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = omega_lib/obj -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -43,56 +86,120 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libomega_a_AR = $(AR) $(ARFLAGS) libomega_a_LIBADD = -am__objects_1 = libomega_a-ConstString.$(OBJEXT) \ - libomega_a-Link.$(OBJEXT) -am__objects_2 = libomega_a-oc.$(OBJEXT) libomega_a-oc_eq.$(OBJEXT) \ - libomega_a-oc_exp_kill.$(OBJEXT) \ - libomega_a-oc_global.$(OBJEXT) libomega_a-oc_print.$(OBJEXT) \ - libomega_a-oc_problems.$(OBJEXT) \ - libomega_a-oc_simple.$(OBJEXT) libomega_a-oc_solve.$(OBJEXT) \ - libomega_a-oc_query.$(OBJEXT) \ - libomega_a-oc_quick_kill.$(OBJEXT) \ - libomega_a-oc_util.$(OBJEXT) -am__objects_3 = libomega_a-pres_beaut.$(OBJEXT) \ - libomega_a-pres_cnstr.$(OBJEXT) libomega_a-pres_col.$(OBJEXT) \ - libomega_a-pres_conj.$(OBJEXT) libomega_a-pres_decl.$(OBJEXT) \ - libomega_a-pres_dnf.$(OBJEXT) libomega_a-pres_form.$(OBJEXT) \ - libomega_a-pres_gen.$(OBJEXT) libomega_a-pres_logic.$(OBJEXT) \ - libomega_a-pres_print.$(OBJEXT) libomega_a-pres_rear.$(OBJEXT) \ - libomega_a-pres_quant.$(OBJEXT) libomega_a-pres_subs.$(OBJEXT) \ - libomega_a-pres_var.$(OBJEXT) -am__objects_4 = libomega_a-evac.$(OBJEXT) libomega_a-farkas.$(OBJEXT) \ - libomega_a-hull_legacy.$(OBJEXT) \ - libomega_a-hull_simple.$(OBJEXT) libomega_a-Relation.$(OBJEXT) \ - libomega_a-Relations.$(OBJEXT) libomega_a-RelBody.$(OBJEXT) \ - libomega_a-RelVar.$(OBJEXT) -am__objects_5 = libomega_a-closure.$(OBJEXT) \ - libomega_a-reach.$(OBJEXT) +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = ../../basic/src/libomega_a-ConstString.$(OBJEXT) \ + ../../basic/src/libomega_a-Link.$(OBJEXT) +am__objects_2 = ../src/omega_core/libomega_a-oc.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_eq.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_exp_kill.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_global.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_print.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_problems.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_simple.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_solve.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_query.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_quick_kill.$(OBJEXT) \ + ../src/omega_core/libomega_a-oc_util.$(OBJEXT) +am__objects_3 = ../src/libomega_a-pres_beaut.$(OBJEXT) \ + ../src/libomega_a-pres_cnstr.$(OBJEXT) \ + ../src/libomega_a-pres_col.$(OBJEXT) \ + ../src/libomega_a-pres_conj.$(OBJEXT) \ + ../src/libomega_a-pres_decl.$(OBJEXT) \ + ../src/libomega_a-pres_dnf.$(OBJEXT) \ + ../src/libomega_a-pres_form.$(OBJEXT) \ + ../src/libomega_a-pres_gen.$(OBJEXT) \ + ../src/libomega_a-pres_logic.$(OBJEXT) \ + ../src/libomega_a-pres_print.$(OBJEXT) \ + ../src/libomega_a-pres_rear.$(OBJEXT) \ + ../src/libomega_a-pres_quant.$(OBJEXT) \ + ../src/libomega_a-pres_subs.$(OBJEXT) \ + ../src/libomega_a-pres_var.$(OBJEXT) +am__objects_4 = ../src/libomega_a-evac.$(OBJEXT) \ + ../src/libomega_a-farkas.$(OBJEXT) \ + ../src/libomega_a-hull_legacy.$(OBJEXT) \ + ../src/libomega_a-hull_simple.$(OBJEXT) \ + ../src/libomega_a-Relation.$(OBJEXT) \ + ../src/libomega_a-Relations.$(OBJEXT) \ + ../src/libomega_a-RelBody.$(OBJEXT) \ + ../src/libomega_a-RelVar.$(OBJEXT) +am__objects_5 = ../src/libomega_a-closure.$(OBJEXT) \ + ../src/libomega_a-reach.$(OBJEXT) am_libomega_a_OBJECTS = $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) $(am__objects_5) libomega_a_OBJECTS = $(am_libomega_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libomega_a_SOURCES) DIST_SOURCES = $(libomega_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -113,6 +220,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -125,6 +233,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -142,12 +251,13 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -155,6 +265,7 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -178,8 +289,12 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ noinst_LIBRARIES = libomega.a basic_src = ../../basic/src/ConstString.cc ../../basic/src/Link.cc oc_src = ../src/omega_core/oc.cc ../src/omega_core/oc_eq.cc \ @@ -209,14 +324,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign omega_lib/obj/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign omega_lib/obj/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign omega_lib/obj/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign omega_lib/obj/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -234,663 +349,781 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libomega.a: $(libomega_a_OBJECTS) $(libomega_a_DEPENDENCIES) - -rm -f libomega.a - $(libomega_a_AR) libomega.a $(libomega_a_OBJECTS) $(libomega_a_LIBADD) - $(RANLIB) libomega.a +../../basic/src/$(am__dirstamp): + @$(MKDIR_P) ../../basic/src + @: > ../../basic/src/$(am__dirstamp) +../../basic/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../../basic/src/$(DEPDIR) + @: > ../../basic/src/$(DEPDIR)/$(am__dirstamp) +../../basic/src/libomega_a-ConstString.$(OBJEXT): \ + ../../basic/src/$(am__dirstamp) \ + ../../basic/src/$(DEPDIR)/$(am__dirstamp) +../../basic/src/libomega_a-Link.$(OBJEXT): \ + ../../basic/src/$(am__dirstamp) \ + ../../basic/src/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/$(am__dirstamp): + @$(MKDIR_P) ../src/omega_core + @: > ../src/omega_core/$(am__dirstamp) +../src/omega_core/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../src/omega_core/$(DEPDIR) + @: > ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_eq.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_exp_kill.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_global.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_print.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_problems.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_simple.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_solve.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_query.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_quick_kill.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/omega_core/libomega_a-oc_util.$(OBJEXT): \ + ../src/omega_core/$(am__dirstamp) \ + ../src/omega_core/$(DEPDIR)/$(am__dirstamp) +../src/$(am__dirstamp): + @$(MKDIR_P) ../src + @: > ../src/$(am__dirstamp) +../src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../src/$(DEPDIR) + @: > ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_beaut.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_cnstr.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_col.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_conj.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_decl.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_dnf.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_form.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_gen.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_logic.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_print.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_rear.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_quant.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_subs.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-pres_var.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-evac.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-farkas.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-hull_legacy.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-hull_simple.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-Relation.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-Relations.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-RelBody.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-RelVar.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-closure.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) +../src/libomega_a-reach.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) + +libomega.a: $(libomega_a_OBJECTS) $(libomega_a_DEPENDENCIES) $(EXTRA_libomega_a_DEPENDENCIES) + $(AM_V_at)-rm -f libomega.a + $(AM_V_AR)$(libomega_a_AR) libomega.a $(libomega_a_OBJECTS) $(libomega_a_LIBADD) + $(AM_V_at)$(RANLIB) libomega.a mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f ../../basic/src/*.$(OBJEXT) + -rm -f ../src/*.$(OBJEXT) + -rm -f ../src/omega_core/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-ConstString.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-Link.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-RelBody.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-RelVar.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-Relation.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-Relations.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-closure.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-evac.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-farkas.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-hull_legacy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-hull_simple.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_eq.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_exp_kill.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_global.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_print.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_problems.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_query.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_quick_kill.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_simple.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_solve.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-oc_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_beaut.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_cnstr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_col.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_conj.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_decl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_dnf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_form.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_gen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_logic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_print.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_quant.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_rear.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_subs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-pres_var.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libomega_a-reach.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../basic/src/$(DEPDIR)/libomega_a-ConstString.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../basic/src/$(DEPDIR)/libomega_a-Link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-RelBody.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-RelVar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-Relation.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-Relations.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-closure.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-evac.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-farkas.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-hull_legacy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-hull_simple.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_beaut.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_cnstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_col.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_conj.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_decl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_dnf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_form.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_gen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_logic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_quant.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_rear.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_subs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-pres_var.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/libomega_a-reach.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_eq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_exp_kill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_global.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_problems.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_query.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_quick_kill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_simple.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_solve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/omega_core/$(DEPDIR)/libomega_a-oc_util.Po@am__quote@ .cc.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -libomega_a-ConstString.o: ../../basic/src/ConstString.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-ConstString.o -MD -MP -MF "$(DEPDIR)/libomega_a-ConstString.Tpo" -c -o libomega_a-ConstString.o `test -f '../../basic/src/ConstString.cc' || echo '$(srcdir)/'`../../basic/src/ConstString.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-ConstString.Tpo" "$(DEPDIR)/libomega_a-ConstString.Po"; else rm -f "$(DEPDIR)/libomega_a-ConstString.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../basic/src/ConstString.cc' object='libomega_a-ConstString.o' libtool=no @AMDEPBACKSLASH@ +../../basic/src/libomega_a-ConstString.o: ../../basic/src/ConstString.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../../basic/src/libomega_a-ConstString.o -MD -MP -MF ../../basic/src/$(DEPDIR)/libomega_a-ConstString.Tpo -c -o ../../basic/src/libomega_a-ConstString.o `test -f '../../basic/src/ConstString.cc' || echo '$(srcdir)/'`../../basic/src/ConstString.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../../basic/src/$(DEPDIR)/libomega_a-ConstString.Tpo ../../basic/src/$(DEPDIR)/libomega_a-ConstString.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../../basic/src/ConstString.cc' object='../../basic/src/libomega_a-ConstString.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-ConstString.o `test -f '../../basic/src/ConstString.cc' || echo '$(srcdir)/'`../../basic/src/ConstString.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../../basic/src/libomega_a-ConstString.o `test -f '../../basic/src/ConstString.cc' || echo '$(srcdir)/'`../../basic/src/ConstString.cc -libomega_a-ConstString.obj: ../../basic/src/ConstString.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-ConstString.obj -MD -MP -MF "$(DEPDIR)/libomega_a-ConstString.Tpo" -c -o libomega_a-ConstString.obj `if test -f '../../basic/src/ConstString.cc'; then $(CYGPATH_W) '../../basic/src/ConstString.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/ConstString.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-ConstString.Tpo" "$(DEPDIR)/libomega_a-ConstString.Po"; else rm -f "$(DEPDIR)/libomega_a-ConstString.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../basic/src/ConstString.cc' object='libomega_a-ConstString.obj' libtool=no @AMDEPBACKSLASH@ +../../basic/src/libomega_a-ConstString.obj: ../../basic/src/ConstString.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../../basic/src/libomega_a-ConstString.obj -MD -MP -MF ../../basic/src/$(DEPDIR)/libomega_a-ConstString.Tpo -c -o ../../basic/src/libomega_a-ConstString.obj `if test -f '../../basic/src/ConstString.cc'; then $(CYGPATH_W) '../../basic/src/ConstString.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/ConstString.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../../basic/src/$(DEPDIR)/libomega_a-ConstString.Tpo ../../basic/src/$(DEPDIR)/libomega_a-ConstString.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../../basic/src/ConstString.cc' object='../../basic/src/libomega_a-ConstString.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-ConstString.obj `if test -f '../../basic/src/ConstString.cc'; then $(CYGPATH_W) '../../basic/src/ConstString.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/ConstString.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../../basic/src/libomega_a-ConstString.obj `if test -f '../../basic/src/ConstString.cc'; then $(CYGPATH_W) '../../basic/src/ConstString.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/ConstString.cc'; fi` -libomega_a-Link.o: ../../basic/src/Link.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-Link.o -MD -MP -MF "$(DEPDIR)/libomega_a-Link.Tpo" -c -o libomega_a-Link.o `test -f '../../basic/src/Link.cc' || echo '$(srcdir)/'`../../basic/src/Link.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-Link.Tpo" "$(DEPDIR)/libomega_a-Link.Po"; else rm -f "$(DEPDIR)/libomega_a-Link.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../basic/src/Link.cc' object='libomega_a-Link.o' libtool=no @AMDEPBACKSLASH@ +../../basic/src/libomega_a-Link.o: ../../basic/src/Link.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../../basic/src/libomega_a-Link.o -MD -MP -MF ../../basic/src/$(DEPDIR)/libomega_a-Link.Tpo -c -o ../../basic/src/libomega_a-Link.o `test -f '../../basic/src/Link.cc' || echo '$(srcdir)/'`../../basic/src/Link.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../../basic/src/$(DEPDIR)/libomega_a-Link.Tpo ../../basic/src/$(DEPDIR)/libomega_a-Link.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../../basic/src/Link.cc' object='../../basic/src/libomega_a-Link.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-Link.o `test -f '../../basic/src/Link.cc' || echo '$(srcdir)/'`../../basic/src/Link.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../../basic/src/libomega_a-Link.o `test -f '../../basic/src/Link.cc' || echo '$(srcdir)/'`../../basic/src/Link.cc -libomega_a-Link.obj: ../../basic/src/Link.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-Link.obj -MD -MP -MF "$(DEPDIR)/libomega_a-Link.Tpo" -c -o libomega_a-Link.obj `if test -f '../../basic/src/Link.cc'; then $(CYGPATH_W) '../../basic/src/Link.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/Link.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-Link.Tpo" "$(DEPDIR)/libomega_a-Link.Po"; else rm -f "$(DEPDIR)/libomega_a-Link.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../basic/src/Link.cc' object='libomega_a-Link.obj' libtool=no @AMDEPBACKSLASH@ +../../basic/src/libomega_a-Link.obj: ../../basic/src/Link.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../../basic/src/libomega_a-Link.obj -MD -MP -MF ../../basic/src/$(DEPDIR)/libomega_a-Link.Tpo -c -o ../../basic/src/libomega_a-Link.obj `if test -f '../../basic/src/Link.cc'; then $(CYGPATH_W) '../../basic/src/Link.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/Link.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../../basic/src/$(DEPDIR)/libomega_a-Link.Tpo ../../basic/src/$(DEPDIR)/libomega_a-Link.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../../basic/src/Link.cc' object='../../basic/src/libomega_a-Link.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-Link.obj `if test -f '../../basic/src/Link.cc'; then $(CYGPATH_W) '../../basic/src/Link.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/Link.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../../basic/src/libomega_a-Link.obj `if test -f '../../basic/src/Link.cc'; then $(CYGPATH_W) '../../basic/src/Link.cc'; else $(CYGPATH_W) '$(srcdir)/../../basic/src/Link.cc'; fi` -libomega_a-oc.o: ../src/omega_core/oc.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc.Tpo" -c -o libomega_a-oc.o `test -f '../src/omega_core/oc.cc' || echo '$(srcdir)/'`../src/omega_core/oc.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc.Tpo" "$(DEPDIR)/libomega_a-oc.Po"; else rm -f "$(DEPDIR)/libomega_a-oc.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc.cc' object='libomega_a-oc.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc.o: ../src/omega_core/oc.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc.Tpo -c -o ../src/omega_core/libomega_a-oc.o `test -f '../src/omega_core/oc.cc' || echo '$(srcdir)/'`../src/omega_core/oc.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc.cc' object='../src/omega_core/libomega_a-oc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc.o `test -f '../src/omega_core/oc.cc' || echo '$(srcdir)/'`../src/omega_core/oc.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc.o `test -f '../src/omega_core/oc.cc' || echo '$(srcdir)/'`../src/omega_core/oc.cc -libomega_a-oc.obj: ../src/omega_core/oc.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc.Tpo" -c -o libomega_a-oc.obj `if test -f '../src/omega_core/oc.cc'; then $(CYGPATH_W) '../src/omega_core/oc.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc.Tpo" "$(DEPDIR)/libomega_a-oc.Po"; else rm -f "$(DEPDIR)/libomega_a-oc.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc.cc' object='libomega_a-oc.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc.obj: ../src/omega_core/oc.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc.Tpo -c -o ../src/omega_core/libomega_a-oc.obj `if test -f '../src/omega_core/oc.cc'; then $(CYGPATH_W) '../src/omega_core/oc.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc.cc' object='../src/omega_core/libomega_a-oc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc.obj `if test -f '../src/omega_core/oc.cc'; then $(CYGPATH_W) '../src/omega_core/oc.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc.obj `if test -f '../src/omega_core/oc.cc'; then $(CYGPATH_W) '../src/omega_core/oc.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc.cc'; fi` -libomega_a-oc_eq.o: ../src/omega_core/oc_eq.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_eq.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_eq.Tpo" -c -o libomega_a-oc_eq.o `test -f '../src/omega_core/oc_eq.cc' || echo '$(srcdir)/'`../src/omega_core/oc_eq.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_eq.Tpo" "$(DEPDIR)/libomega_a-oc_eq.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_eq.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_eq.cc' object='libomega_a-oc_eq.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_eq.o: ../src/omega_core/oc_eq.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_eq.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_eq.Tpo -c -o ../src/omega_core/libomega_a-oc_eq.o `test -f '../src/omega_core/oc_eq.cc' || echo '$(srcdir)/'`../src/omega_core/oc_eq.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_eq.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_eq.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_eq.cc' object='../src/omega_core/libomega_a-oc_eq.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_eq.o `test -f '../src/omega_core/oc_eq.cc' || echo '$(srcdir)/'`../src/omega_core/oc_eq.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_eq.o `test -f '../src/omega_core/oc_eq.cc' || echo '$(srcdir)/'`../src/omega_core/oc_eq.cc -libomega_a-oc_eq.obj: ../src/omega_core/oc_eq.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_eq.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_eq.Tpo" -c -o libomega_a-oc_eq.obj `if test -f '../src/omega_core/oc_eq.cc'; then $(CYGPATH_W) '../src/omega_core/oc_eq.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_eq.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_eq.Tpo" "$(DEPDIR)/libomega_a-oc_eq.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_eq.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_eq.cc' object='libomega_a-oc_eq.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_eq.obj: ../src/omega_core/oc_eq.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_eq.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_eq.Tpo -c -o ../src/omega_core/libomega_a-oc_eq.obj `if test -f '../src/omega_core/oc_eq.cc'; then $(CYGPATH_W) '../src/omega_core/oc_eq.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_eq.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_eq.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_eq.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_eq.cc' object='../src/omega_core/libomega_a-oc_eq.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_eq.obj `if test -f '../src/omega_core/oc_eq.cc'; then $(CYGPATH_W) '../src/omega_core/oc_eq.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_eq.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_eq.obj `if test -f '../src/omega_core/oc_eq.cc'; then $(CYGPATH_W) '../src/omega_core/oc_eq.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_eq.cc'; fi` -libomega_a-oc_exp_kill.o: ../src/omega_core/oc_exp_kill.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_exp_kill.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_exp_kill.Tpo" -c -o libomega_a-oc_exp_kill.o `test -f '../src/omega_core/oc_exp_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_exp_kill.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_exp_kill.Tpo" "$(DEPDIR)/libomega_a-oc_exp_kill.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_exp_kill.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_exp_kill.cc' object='libomega_a-oc_exp_kill.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_exp_kill.o: ../src/omega_core/oc_exp_kill.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_exp_kill.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_exp_kill.Tpo -c -o ../src/omega_core/libomega_a-oc_exp_kill.o `test -f '../src/omega_core/oc_exp_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_exp_kill.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_exp_kill.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_exp_kill.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_exp_kill.cc' object='../src/omega_core/libomega_a-oc_exp_kill.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_exp_kill.o `test -f '../src/omega_core/oc_exp_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_exp_kill.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_exp_kill.o `test -f '../src/omega_core/oc_exp_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_exp_kill.cc -libomega_a-oc_exp_kill.obj: ../src/omega_core/oc_exp_kill.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_exp_kill.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_exp_kill.Tpo" -c -o libomega_a-oc_exp_kill.obj `if test -f '../src/omega_core/oc_exp_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_exp_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_exp_kill.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_exp_kill.Tpo" "$(DEPDIR)/libomega_a-oc_exp_kill.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_exp_kill.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_exp_kill.cc' object='libomega_a-oc_exp_kill.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_exp_kill.obj: ../src/omega_core/oc_exp_kill.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_exp_kill.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_exp_kill.Tpo -c -o ../src/omega_core/libomega_a-oc_exp_kill.obj `if test -f '../src/omega_core/oc_exp_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_exp_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_exp_kill.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_exp_kill.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_exp_kill.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_exp_kill.cc' object='../src/omega_core/libomega_a-oc_exp_kill.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_exp_kill.obj `if test -f '../src/omega_core/oc_exp_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_exp_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_exp_kill.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_exp_kill.obj `if test -f '../src/omega_core/oc_exp_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_exp_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_exp_kill.cc'; fi` -libomega_a-oc_global.o: ../src/omega_core/oc_global.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_global.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_global.Tpo" -c -o libomega_a-oc_global.o `test -f '../src/omega_core/oc_global.cc' || echo '$(srcdir)/'`../src/omega_core/oc_global.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_global.Tpo" "$(DEPDIR)/libomega_a-oc_global.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_global.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_global.cc' object='libomega_a-oc_global.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_global.o: ../src/omega_core/oc_global.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_global.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_global.Tpo -c -o ../src/omega_core/libomega_a-oc_global.o `test -f '../src/omega_core/oc_global.cc' || echo '$(srcdir)/'`../src/omega_core/oc_global.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_global.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_global.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_global.cc' object='../src/omega_core/libomega_a-oc_global.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_global.o `test -f '../src/omega_core/oc_global.cc' || echo '$(srcdir)/'`../src/omega_core/oc_global.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_global.o `test -f '../src/omega_core/oc_global.cc' || echo '$(srcdir)/'`../src/omega_core/oc_global.cc -libomega_a-oc_global.obj: ../src/omega_core/oc_global.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_global.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_global.Tpo" -c -o libomega_a-oc_global.obj `if test -f '../src/omega_core/oc_global.cc'; then $(CYGPATH_W) '../src/omega_core/oc_global.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_global.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_global.Tpo" "$(DEPDIR)/libomega_a-oc_global.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_global.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_global.cc' object='libomega_a-oc_global.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_global.obj: ../src/omega_core/oc_global.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_global.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_global.Tpo -c -o ../src/omega_core/libomega_a-oc_global.obj `if test -f '../src/omega_core/oc_global.cc'; then $(CYGPATH_W) '../src/omega_core/oc_global.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_global.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_global.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_global.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_global.cc' object='../src/omega_core/libomega_a-oc_global.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_global.obj `if test -f '../src/omega_core/oc_global.cc'; then $(CYGPATH_W) '../src/omega_core/oc_global.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_global.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_global.obj `if test -f '../src/omega_core/oc_global.cc'; then $(CYGPATH_W) '../src/omega_core/oc_global.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_global.cc'; fi` -libomega_a-oc_print.o: ../src/omega_core/oc_print.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_print.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_print.Tpo" -c -o libomega_a-oc_print.o `test -f '../src/omega_core/oc_print.cc' || echo '$(srcdir)/'`../src/omega_core/oc_print.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_print.Tpo" "$(DEPDIR)/libomega_a-oc_print.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_print.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_print.cc' object='libomega_a-oc_print.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_print.o: ../src/omega_core/oc_print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_print.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_print.Tpo -c -o ../src/omega_core/libomega_a-oc_print.o `test -f '../src/omega_core/oc_print.cc' || echo '$(srcdir)/'`../src/omega_core/oc_print.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_print.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_print.cc' object='../src/omega_core/libomega_a-oc_print.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_print.o `test -f '../src/omega_core/oc_print.cc' || echo '$(srcdir)/'`../src/omega_core/oc_print.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_print.o `test -f '../src/omega_core/oc_print.cc' || echo '$(srcdir)/'`../src/omega_core/oc_print.cc -libomega_a-oc_print.obj: ../src/omega_core/oc_print.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_print.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_print.Tpo" -c -o libomega_a-oc_print.obj `if test -f '../src/omega_core/oc_print.cc'; then $(CYGPATH_W) '../src/omega_core/oc_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_print.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_print.Tpo" "$(DEPDIR)/libomega_a-oc_print.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_print.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_print.cc' object='libomega_a-oc_print.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_print.obj: ../src/omega_core/oc_print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_print.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_print.Tpo -c -o ../src/omega_core/libomega_a-oc_print.obj `if test -f '../src/omega_core/oc_print.cc'; then $(CYGPATH_W) '../src/omega_core/oc_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_print.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_print.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_print.cc' object='../src/omega_core/libomega_a-oc_print.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_print.obj `if test -f '../src/omega_core/oc_print.cc'; then $(CYGPATH_W) '../src/omega_core/oc_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_print.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_print.obj `if test -f '../src/omega_core/oc_print.cc'; then $(CYGPATH_W) '../src/omega_core/oc_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_print.cc'; fi` -libomega_a-oc_problems.o: ../src/omega_core/oc_problems.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_problems.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_problems.Tpo" -c -o libomega_a-oc_problems.o `test -f '../src/omega_core/oc_problems.cc' || echo '$(srcdir)/'`../src/omega_core/oc_problems.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_problems.Tpo" "$(DEPDIR)/libomega_a-oc_problems.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_problems.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_problems.cc' object='libomega_a-oc_problems.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_problems.o: ../src/omega_core/oc_problems.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_problems.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_problems.Tpo -c -o ../src/omega_core/libomega_a-oc_problems.o `test -f '../src/omega_core/oc_problems.cc' || echo '$(srcdir)/'`../src/omega_core/oc_problems.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_problems.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_problems.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_problems.cc' object='../src/omega_core/libomega_a-oc_problems.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_problems.o `test -f '../src/omega_core/oc_problems.cc' || echo '$(srcdir)/'`../src/omega_core/oc_problems.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_problems.o `test -f '../src/omega_core/oc_problems.cc' || echo '$(srcdir)/'`../src/omega_core/oc_problems.cc -libomega_a-oc_problems.obj: ../src/omega_core/oc_problems.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_problems.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_problems.Tpo" -c -o libomega_a-oc_problems.obj `if test -f '../src/omega_core/oc_problems.cc'; then $(CYGPATH_W) '../src/omega_core/oc_problems.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_problems.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_problems.Tpo" "$(DEPDIR)/libomega_a-oc_problems.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_problems.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_problems.cc' object='libomega_a-oc_problems.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_problems.obj: ../src/omega_core/oc_problems.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_problems.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_problems.Tpo -c -o ../src/omega_core/libomega_a-oc_problems.obj `if test -f '../src/omega_core/oc_problems.cc'; then $(CYGPATH_W) '../src/omega_core/oc_problems.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_problems.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_problems.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_problems.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_problems.cc' object='../src/omega_core/libomega_a-oc_problems.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_problems.obj `if test -f '../src/omega_core/oc_problems.cc'; then $(CYGPATH_W) '../src/omega_core/oc_problems.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_problems.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_problems.obj `if test -f '../src/omega_core/oc_problems.cc'; then $(CYGPATH_W) '../src/omega_core/oc_problems.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_problems.cc'; fi` -libomega_a-oc_simple.o: ../src/omega_core/oc_simple.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_simple.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_simple.Tpo" -c -o libomega_a-oc_simple.o `test -f '../src/omega_core/oc_simple.cc' || echo '$(srcdir)/'`../src/omega_core/oc_simple.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_simple.Tpo" "$(DEPDIR)/libomega_a-oc_simple.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_simple.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_simple.cc' object='libomega_a-oc_simple.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_simple.o: ../src/omega_core/oc_simple.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_simple.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_simple.Tpo -c -o ../src/omega_core/libomega_a-oc_simple.o `test -f '../src/omega_core/oc_simple.cc' || echo '$(srcdir)/'`../src/omega_core/oc_simple.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_simple.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_simple.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_simple.cc' object='../src/omega_core/libomega_a-oc_simple.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_simple.o `test -f '../src/omega_core/oc_simple.cc' || echo '$(srcdir)/'`../src/omega_core/oc_simple.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_simple.o `test -f '../src/omega_core/oc_simple.cc' || echo '$(srcdir)/'`../src/omega_core/oc_simple.cc -libomega_a-oc_simple.obj: ../src/omega_core/oc_simple.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_simple.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_simple.Tpo" -c -o libomega_a-oc_simple.obj `if test -f '../src/omega_core/oc_simple.cc'; then $(CYGPATH_W) '../src/omega_core/oc_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_simple.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_simple.Tpo" "$(DEPDIR)/libomega_a-oc_simple.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_simple.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_simple.cc' object='libomega_a-oc_simple.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_simple.obj: ../src/omega_core/oc_simple.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_simple.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_simple.Tpo -c -o ../src/omega_core/libomega_a-oc_simple.obj `if test -f '../src/omega_core/oc_simple.cc'; then $(CYGPATH_W) '../src/omega_core/oc_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_simple.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_simple.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_simple.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_simple.cc' object='../src/omega_core/libomega_a-oc_simple.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_simple.obj `if test -f '../src/omega_core/oc_simple.cc'; then $(CYGPATH_W) '../src/omega_core/oc_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_simple.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_simple.obj `if test -f '../src/omega_core/oc_simple.cc'; then $(CYGPATH_W) '../src/omega_core/oc_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_simple.cc'; fi` -libomega_a-oc_solve.o: ../src/omega_core/oc_solve.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_solve.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_solve.Tpo" -c -o libomega_a-oc_solve.o `test -f '../src/omega_core/oc_solve.cc' || echo '$(srcdir)/'`../src/omega_core/oc_solve.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_solve.Tpo" "$(DEPDIR)/libomega_a-oc_solve.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_solve.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_solve.cc' object='libomega_a-oc_solve.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_solve.o: ../src/omega_core/oc_solve.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_solve.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_solve.Tpo -c -o ../src/omega_core/libomega_a-oc_solve.o `test -f '../src/omega_core/oc_solve.cc' || echo '$(srcdir)/'`../src/omega_core/oc_solve.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_solve.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_solve.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_solve.cc' object='../src/omega_core/libomega_a-oc_solve.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_solve.o `test -f '../src/omega_core/oc_solve.cc' || echo '$(srcdir)/'`../src/omega_core/oc_solve.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_solve.o `test -f '../src/omega_core/oc_solve.cc' || echo '$(srcdir)/'`../src/omega_core/oc_solve.cc -libomega_a-oc_solve.obj: ../src/omega_core/oc_solve.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_solve.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_solve.Tpo" -c -o libomega_a-oc_solve.obj `if test -f '../src/omega_core/oc_solve.cc'; then $(CYGPATH_W) '../src/omega_core/oc_solve.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_solve.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_solve.Tpo" "$(DEPDIR)/libomega_a-oc_solve.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_solve.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_solve.cc' object='libomega_a-oc_solve.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_solve.obj: ../src/omega_core/oc_solve.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_solve.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_solve.Tpo -c -o ../src/omega_core/libomega_a-oc_solve.obj `if test -f '../src/omega_core/oc_solve.cc'; then $(CYGPATH_W) '../src/omega_core/oc_solve.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_solve.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_solve.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_solve.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_solve.cc' object='../src/omega_core/libomega_a-oc_solve.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_solve.obj `if test -f '../src/omega_core/oc_solve.cc'; then $(CYGPATH_W) '../src/omega_core/oc_solve.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_solve.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_solve.obj `if test -f '../src/omega_core/oc_solve.cc'; then $(CYGPATH_W) '../src/omega_core/oc_solve.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_solve.cc'; fi` -libomega_a-oc_query.o: ../src/omega_core/oc_query.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_query.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_query.Tpo" -c -o libomega_a-oc_query.o `test -f '../src/omega_core/oc_query.cc' || echo '$(srcdir)/'`../src/omega_core/oc_query.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_query.Tpo" "$(DEPDIR)/libomega_a-oc_query.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_query.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_query.cc' object='libomega_a-oc_query.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_query.o: ../src/omega_core/oc_query.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_query.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_query.Tpo -c -o ../src/omega_core/libomega_a-oc_query.o `test -f '../src/omega_core/oc_query.cc' || echo '$(srcdir)/'`../src/omega_core/oc_query.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_query.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_query.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_query.cc' object='../src/omega_core/libomega_a-oc_query.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_query.o `test -f '../src/omega_core/oc_query.cc' || echo '$(srcdir)/'`../src/omega_core/oc_query.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_query.o `test -f '../src/omega_core/oc_query.cc' || echo '$(srcdir)/'`../src/omega_core/oc_query.cc -libomega_a-oc_query.obj: ../src/omega_core/oc_query.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_query.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_query.Tpo" -c -o libomega_a-oc_query.obj `if test -f '../src/omega_core/oc_query.cc'; then $(CYGPATH_W) '../src/omega_core/oc_query.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_query.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_query.Tpo" "$(DEPDIR)/libomega_a-oc_query.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_query.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_query.cc' object='libomega_a-oc_query.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_query.obj: ../src/omega_core/oc_query.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_query.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_query.Tpo -c -o ../src/omega_core/libomega_a-oc_query.obj `if test -f '../src/omega_core/oc_query.cc'; then $(CYGPATH_W) '../src/omega_core/oc_query.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_query.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_query.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_query.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_query.cc' object='../src/omega_core/libomega_a-oc_query.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_query.obj `if test -f '../src/omega_core/oc_query.cc'; then $(CYGPATH_W) '../src/omega_core/oc_query.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_query.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_query.obj `if test -f '../src/omega_core/oc_query.cc'; then $(CYGPATH_W) '../src/omega_core/oc_query.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_query.cc'; fi` -libomega_a-oc_quick_kill.o: ../src/omega_core/oc_quick_kill.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_quick_kill.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_quick_kill.Tpo" -c -o libomega_a-oc_quick_kill.o `test -f '../src/omega_core/oc_quick_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_quick_kill.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_quick_kill.Tpo" "$(DEPDIR)/libomega_a-oc_quick_kill.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_quick_kill.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_quick_kill.cc' object='libomega_a-oc_quick_kill.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_quick_kill.o: ../src/omega_core/oc_quick_kill.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_quick_kill.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_quick_kill.Tpo -c -o ../src/omega_core/libomega_a-oc_quick_kill.o `test -f '../src/omega_core/oc_quick_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_quick_kill.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_quick_kill.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_quick_kill.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_quick_kill.cc' object='../src/omega_core/libomega_a-oc_quick_kill.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_quick_kill.o `test -f '../src/omega_core/oc_quick_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_quick_kill.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_quick_kill.o `test -f '../src/omega_core/oc_quick_kill.cc' || echo '$(srcdir)/'`../src/omega_core/oc_quick_kill.cc -libomega_a-oc_quick_kill.obj: ../src/omega_core/oc_quick_kill.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_quick_kill.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_quick_kill.Tpo" -c -o libomega_a-oc_quick_kill.obj `if test -f '../src/omega_core/oc_quick_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_quick_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_quick_kill.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_quick_kill.Tpo" "$(DEPDIR)/libomega_a-oc_quick_kill.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_quick_kill.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_quick_kill.cc' object='libomega_a-oc_quick_kill.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_quick_kill.obj: ../src/omega_core/oc_quick_kill.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_quick_kill.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_quick_kill.Tpo -c -o ../src/omega_core/libomega_a-oc_quick_kill.obj `if test -f '../src/omega_core/oc_quick_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_quick_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_quick_kill.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_quick_kill.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_quick_kill.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_quick_kill.cc' object='../src/omega_core/libomega_a-oc_quick_kill.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_quick_kill.obj `if test -f '../src/omega_core/oc_quick_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_quick_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_quick_kill.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_quick_kill.obj `if test -f '../src/omega_core/oc_quick_kill.cc'; then $(CYGPATH_W) '../src/omega_core/oc_quick_kill.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_quick_kill.cc'; fi` -libomega_a-oc_util.o: ../src/omega_core/oc_util.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_util.o -MD -MP -MF "$(DEPDIR)/libomega_a-oc_util.Tpo" -c -o libomega_a-oc_util.o `test -f '../src/omega_core/oc_util.cc' || echo '$(srcdir)/'`../src/omega_core/oc_util.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_util.Tpo" "$(DEPDIR)/libomega_a-oc_util.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_util.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_util.cc' object='libomega_a-oc_util.o' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_util.o: ../src/omega_core/oc_util.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_util.o -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_util.Tpo -c -o ../src/omega_core/libomega_a-oc_util.o `test -f '../src/omega_core/oc_util.cc' || echo '$(srcdir)/'`../src/omega_core/oc_util.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_util.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_util.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_util.cc' object='../src/omega_core/libomega_a-oc_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_util.o `test -f '../src/omega_core/oc_util.cc' || echo '$(srcdir)/'`../src/omega_core/oc_util.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_util.o `test -f '../src/omega_core/oc_util.cc' || echo '$(srcdir)/'`../src/omega_core/oc_util.cc -libomega_a-oc_util.obj: ../src/omega_core/oc_util.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-oc_util.obj -MD -MP -MF "$(DEPDIR)/libomega_a-oc_util.Tpo" -c -o libomega_a-oc_util.obj `if test -f '../src/omega_core/oc_util.cc'; then $(CYGPATH_W) '../src/omega_core/oc_util.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_util.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-oc_util.Tpo" "$(DEPDIR)/libomega_a-oc_util.Po"; else rm -f "$(DEPDIR)/libomega_a-oc_util.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/omega_core/oc_util.cc' object='libomega_a-oc_util.obj' libtool=no @AMDEPBACKSLASH@ +../src/omega_core/libomega_a-oc_util.obj: ../src/omega_core/oc_util.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/omega_core/libomega_a-oc_util.obj -MD -MP -MF ../src/omega_core/$(DEPDIR)/libomega_a-oc_util.Tpo -c -o ../src/omega_core/libomega_a-oc_util.obj `if test -f '../src/omega_core/oc_util.cc'; then $(CYGPATH_W) '../src/omega_core/oc_util.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_util.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/omega_core/$(DEPDIR)/libomega_a-oc_util.Tpo ../src/omega_core/$(DEPDIR)/libomega_a-oc_util.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/omega_core/oc_util.cc' object='../src/omega_core/libomega_a-oc_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-oc_util.obj `if test -f '../src/omega_core/oc_util.cc'; then $(CYGPATH_W) '../src/omega_core/oc_util.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_util.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/omega_core/libomega_a-oc_util.obj `if test -f '../src/omega_core/oc_util.cc'; then $(CYGPATH_W) '../src/omega_core/oc_util.cc'; else $(CYGPATH_W) '$(srcdir)/../src/omega_core/oc_util.cc'; fi` -libomega_a-pres_beaut.o: ../src/pres_beaut.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_beaut.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_beaut.Tpo" -c -o libomega_a-pres_beaut.o `test -f '../src/pres_beaut.cc' || echo '$(srcdir)/'`../src/pres_beaut.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_beaut.Tpo" "$(DEPDIR)/libomega_a-pres_beaut.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_beaut.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_beaut.cc' object='libomega_a-pres_beaut.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_beaut.o: ../src/pres_beaut.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_beaut.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_beaut.Tpo -c -o ../src/libomega_a-pres_beaut.o `test -f '../src/pres_beaut.cc' || echo '$(srcdir)/'`../src/pres_beaut.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_beaut.Tpo ../src/$(DEPDIR)/libomega_a-pres_beaut.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_beaut.cc' object='../src/libomega_a-pres_beaut.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_beaut.o `test -f '../src/pres_beaut.cc' || echo '$(srcdir)/'`../src/pres_beaut.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_beaut.o `test -f '../src/pres_beaut.cc' || echo '$(srcdir)/'`../src/pres_beaut.cc -libomega_a-pres_beaut.obj: ../src/pres_beaut.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_beaut.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_beaut.Tpo" -c -o libomega_a-pres_beaut.obj `if test -f '../src/pres_beaut.cc'; then $(CYGPATH_W) '../src/pres_beaut.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_beaut.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_beaut.Tpo" "$(DEPDIR)/libomega_a-pres_beaut.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_beaut.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_beaut.cc' object='libomega_a-pres_beaut.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_beaut.obj: ../src/pres_beaut.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_beaut.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_beaut.Tpo -c -o ../src/libomega_a-pres_beaut.obj `if test -f '../src/pres_beaut.cc'; then $(CYGPATH_W) '../src/pres_beaut.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_beaut.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_beaut.Tpo ../src/$(DEPDIR)/libomega_a-pres_beaut.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_beaut.cc' object='../src/libomega_a-pres_beaut.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_beaut.obj `if test -f '../src/pres_beaut.cc'; then $(CYGPATH_W) '../src/pres_beaut.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_beaut.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_beaut.obj `if test -f '../src/pres_beaut.cc'; then $(CYGPATH_W) '../src/pres_beaut.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_beaut.cc'; fi` -libomega_a-pres_cnstr.o: ../src/pres_cnstr.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_cnstr.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_cnstr.Tpo" -c -o libomega_a-pres_cnstr.o `test -f '../src/pres_cnstr.cc' || echo '$(srcdir)/'`../src/pres_cnstr.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_cnstr.Tpo" "$(DEPDIR)/libomega_a-pres_cnstr.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_cnstr.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_cnstr.cc' object='libomega_a-pres_cnstr.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_cnstr.o: ../src/pres_cnstr.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_cnstr.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_cnstr.Tpo -c -o ../src/libomega_a-pres_cnstr.o `test -f '../src/pres_cnstr.cc' || echo '$(srcdir)/'`../src/pres_cnstr.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_cnstr.Tpo ../src/$(DEPDIR)/libomega_a-pres_cnstr.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_cnstr.cc' object='../src/libomega_a-pres_cnstr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_cnstr.o `test -f '../src/pres_cnstr.cc' || echo '$(srcdir)/'`../src/pres_cnstr.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_cnstr.o `test -f '../src/pres_cnstr.cc' || echo '$(srcdir)/'`../src/pres_cnstr.cc -libomega_a-pres_cnstr.obj: ../src/pres_cnstr.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_cnstr.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_cnstr.Tpo" -c -o libomega_a-pres_cnstr.obj `if test -f '../src/pres_cnstr.cc'; then $(CYGPATH_W) '../src/pres_cnstr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_cnstr.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_cnstr.Tpo" "$(DEPDIR)/libomega_a-pres_cnstr.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_cnstr.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_cnstr.cc' object='libomega_a-pres_cnstr.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_cnstr.obj: ../src/pres_cnstr.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_cnstr.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_cnstr.Tpo -c -o ../src/libomega_a-pres_cnstr.obj `if test -f '../src/pres_cnstr.cc'; then $(CYGPATH_W) '../src/pres_cnstr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_cnstr.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_cnstr.Tpo ../src/$(DEPDIR)/libomega_a-pres_cnstr.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_cnstr.cc' object='../src/libomega_a-pres_cnstr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_cnstr.obj `if test -f '../src/pres_cnstr.cc'; then $(CYGPATH_W) '../src/pres_cnstr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_cnstr.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_cnstr.obj `if test -f '../src/pres_cnstr.cc'; then $(CYGPATH_W) '../src/pres_cnstr.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_cnstr.cc'; fi` -libomega_a-pres_col.o: ../src/pres_col.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_col.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_col.Tpo" -c -o libomega_a-pres_col.o `test -f '../src/pres_col.cc' || echo '$(srcdir)/'`../src/pres_col.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_col.Tpo" "$(DEPDIR)/libomega_a-pres_col.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_col.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_col.cc' object='libomega_a-pres_col.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_col.o: ../src/pres_col.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_col.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_col.Tpo -c -o ../src/libomega_a-pres_col.o `test -f '../src/pres_col.cc' || echo '$(srcdir)/'`../src/pres_col.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_col.Tpo ../src/$(DEPDIR)/libomega_a-pres_col.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_col.cc' object='../src/libomega_a-pres_col.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_col.o `test -f '../src/pres_col.cc' || echo '$(srcdir)/'`../src/pres_col.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_col.o `test -f '../src/pres_col.cc' || echo '$(srcdir)/'`../src/pres_col.cc -libomega_a-pres_col.obj: ../src/pres_col.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_col.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_col.Tpo" -c -o libomega_a-pres_col.obj `if test -f '../src/pres_col.cc'; then $(CYGPATH_W) '../src/pres_col.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_col.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_col.Tpo" "$(DEPDIR)/libomega_a-pres_col.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_col.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_col.cc' object='libomega_a-pres_col.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_col.obj: ../src/pres_col.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_col.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_col.Tpo -c -o ../src/libomega_a-pres_col.obj `if test -f '../src/pres_col.cc'; then $(CYGPATH_W) '../src/pres_col.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_col.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_col.Tpo ../src/$(DEPDIR)/libomega_a-pres_col.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_col.cc' object='../src/libomega_a-pres_col.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_col.obj `if test -f '../src/pres_col.cc'; then $(CYGPATH_W) '../src/pres_col.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_col.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_col.obj `if test -f '../src/pres_col.cc'; then $(CYGPATH_W) '../src/pres_col.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_col.cc'; fi` -libomega_a-pres_conj.o: ../src/pres_conj.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_conj.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_conj.Tpo" -c -o libomega_a-pres_conj.o `test -f '../src/pres_conj.cc' || echo '$(srcdir)/'`../src/pres_conj.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_conj.Tpo" "$(DEPDIR)/libomega_a-pres_conj.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_conj.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_conj.cc' object='libomega_a-pres_conj.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_conj.o: ../src/pres_conj.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_conj.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_conj.Tpo -c -o ../src/libomega_a-pres_conj.o `test -f '../src/pres_conj.cc' || echo '$(srcdir)/'`../src/pres_conj.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_conj.Tpo ../src/$(DEPDIR)/libomega_a-pres_conj.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_conj.cc' object='../src/libomega_a-pres_conj.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_conj.o `test -f '../src/pres_conj.cc' || echo '$(srcdir)/'`../src/pres_conj.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_conj.o `test -f '../src/pres_conj.cc' || echo '$(srcdir)/'`../src/pres_conj.cc -libomega_a-pres_conj.obj: ../src/pres_conj.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_conj.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_conj.Tpo" -c -o libomega_a-pres_conj.obj `if test -f '../src/pres_conj.cc'; then $(CYGPATH_W) '../src/pres_conj.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_conj.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_conj.Tpo" "$(DEPDIR)/libomega_a-pres_conj.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_conj.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_conj.cc' object='libomega_a-pres_conj.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_conj.obj: ../src/pres_conj.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_conj.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_conj.Tpo -c -o ../src/libomega_a-pres_conj.obj `if test -f '../src/pres_conj.cc'; then $(CYGPATH_W) '../src/pres_conj.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_conj.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_conj.Tpo ../src/$(DEPDIR)/libomega_a-pres_conj.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_conj.cc' object='../src/libomega_a-pres_conj.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_conj.obj `if test -f '../src/pres_conj.cc'; then $(CYGPATH_W) '../src/pres_conj.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_conj.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_conj.obj `if test -f '../src/pres_conj.cc'; then $(CYGPATH_W) '../src/pres_conj.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_conj.cc'; fi` -libomega_a-pres_decl.o: ../src/pres_decl.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_decl.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_decl.Tpo" -c -o libomega_a-pres_decl.o `test -f '../src/pres_decl.cc' || echo '$(srcdir)/'`../src/pres_decl.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_decl.Tpo" "$(DEPDIR)/libomega_a-pres_decl.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_decl.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_decl.cc' object='libomega_a-pres_decl.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_decl.o: ../src/pres_decl.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_decl.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_decl.Tpo -c -o ../src/libomega_a-pres_decl.o `test -f '../src/pres_decl.cc' || echo '$(srcdir)/'`../src/pres_decl.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_decl.Tpo ../src/$(DEPDIR)/libomega_a-pres_decl.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_decl.cc' object='../src/libomega_a-pres_decl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_decl.o `test -f '../src/pres_decl.cc' || echo '$(srcdir)/'`../src/pres_decl.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_decl.o `test -f '../src/pres_decl.cc' || echo '$(srcdir)/'`../src/pres_decl.cc -libomega_a-pres_decl.obj: ../src/pres_decl.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_decl.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_decl.Tpo" -c -o libomega_a-pres_decl.obj `if test -f '../src/pres_decl.cc'; then $(CYGPATH_W) '../src/pres_decl.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_decl.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_decl.Tpo" "$(DEPDIR)/libomega_a-pres_decl.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_decl.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_decl.cc' object='libomega_a-pres_decl.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_decl.obj: ../src/pres_decl.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_decl.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_decl.Tpo -c -o ../src/libomega_a-pres_decl.obj `if test -f '../src/pres_decl.cc'; then $(CYGPATH_W) '../src/pres_decl.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_decl.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_decl.Tpo ../src/$(DEPDIR)/libomega_a-pres_decl.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_decl.cc' object='../src/libomega_a-pres_decl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_decl.obj `if test -f '../src/pres_decl.cc'; then $(CYGPATH_W) '../src/pres_decl.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_decl.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_decl.obj `if test -f '../src/pres_decl.cc'; then $(CYGPATH_W) '../src/pres_decl.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_decl.cc'; fi` -libomega_a-pres_dnf.o: ../src/pres_dnf.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_dnf.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_dnf.Tpo" -c -o libomega_a-pres_dnf.o `test -f '../src/pres_dnf.cc' || echo '$(srcdir)/'`../src/pres_dnf.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_dnf.Tpo" "$(DEPDIR)/libomega_a-pres_dnf.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_dnf.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_dnf.cc' object='libomega_a-pres_dnf.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_dnf.o: ../src/pres_dnf.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_dnf.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_dnf.Tpo -c -o ../src/libomega_a-pres_dnf.o `test -f '../src/pres_dnf.cc' || echo '$(srcdir)/'`../src/pres_dnf.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_dnf.Tpo ../src/$(DEPDIR)/libomega_a-pres_dnf.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_dnf.cc' object='../src/libomega_a-pres_dnf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_dnf.o `test -f '../src/pres_dnf.cc' || echo '$(srcdir)/'`../src/pres_dnf.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_dnf.o `test -f '../src/pres_dnf.cc' || echo '$(srcdir)/'`../src/pres_dnf.cc -libomega_a-pres_dnf.obj: ../src/pres_dnf.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_dnf.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_dnf.Tpo" -c -o libomega_a-pres_dnf.obj `if test -f '../src/pres_dnf.cc'; then $(CYGPATH_W) '../src/pres_dnf.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_dnf.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_dnf.Tpo" "$(DEPDIR)/libomega_a-pres_dnf.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_dnf.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_dnf.cc' object='libomega_a-pres_dnf.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_dnf.obj: ../src/pres_dnf.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_dnf.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_dnf.Tpo -c -o ../src/libomega_a-pres_dnf.obj `if test -f '../src/pres_dnf.cc'; then $(CYGPATH_W) '../src/pres_dnf.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_dnf.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_dnf.Tpo ../src/$(DEPDIR)/libomega_a-pres_dnf.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_dnf.cc' object='../src/libomega_a-pres_dnf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_dnf.obj `if test -f '../src/pres_dnf.cc'; then $(CYGPATH_W) '../src/pres_dnf.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_dnf.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_dnf.obj `if test -f '../src/pres_dnf.cc'; then $(CYGPATH_W) '../src/pres_dnf.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_dnf.cc'; fi` -libomega_a-pres_form.o: ../src/pres_form.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_form.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_form.Tpo" -c -o libomega_a-pres_form.o `test -f '../src/pres_form.cc' || echo '$(srcdir)/'`../src/pres_form.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_form.Tpo" "$(DEPDIR)/libomega_a-pres_form.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_form.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_form.cc' object='libomega_a-pres_form.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_form.o: ../src/pres_form.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_form.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_form.Tpo -c -o ../src/libomega_a-pres_form.o `test -f '../src/pres_form.cc' || echo '$(srcdir)/'`../src/pres_form.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_form.Tpo ../src/$(DEPDIR)/libomega_a-pres_form.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_form.cc' object='../src/libomega_a-pres_form.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_form.o `test -f '../src/pres_form.cc' || echo '$(srcdir)/'`../src/pres_form.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_form.o `test -f '../src/pres_form.cc' || echo '$(srcdir)/'`../src/pres_form.cc -libomega_a-pres_form.obj: ../src/pres_form.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_form.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_form.Tpo" -c -o libomega_a-pres_form.obj `if test -f '../src/pres_form.cc'; then $(CYGPATH_W) '../src/pres_form.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_form.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_form.Tpo" "$(DEPDIR)/libomega_a-pres_form.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_form.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_form.cc' object='libomega_a-pres_form.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_form.obj: ../src/pres_form.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_form.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_form.Tpo -c -o ../src/libomega_a-pres_form.obj `if test -f '../src/pres_form.cc'; then $(CYGPATH_W) '../src/pres_form.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_form.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_form.Tpo ../src/$(DEPDIR)/libomega_a-pres_form.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_form.cc' object='../src/libomega_a-pres_form.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_form.obj `if test -f '../src/pres_form.cc'; then $(CYGPATH_W) '../src/pres_form.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_form.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_form.obj `if test -f '../src/pres_form.cc'; then $(CYGPATH_W) '../src/pres_form.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_form.cc'; fi` -libomega_a-pres_gen.o: ../src/pres_gen.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_gen.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_gen.Tpo" -c -o libomega_a-pres_gen.o `test -f '../src/pres_gen.cc' || echo '$(srcdir)/'`../src/pres_gen.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_gen.Tpo" "$(DEPDIR)/libomega_a-pres_gen.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_gen.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_gen.cc' object='libomega_a-pres_gen.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_gen.o: ../src/pres_gen.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_gen.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_gen.Tpo -c -o ../src/libomega_a-pres_gen.o `test -f '../src/pres_gen.cc' || echo '$(srcdir)/'`../src/pres_gen.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_gen.Tpo ../src/$(DEPDIR)/libomega_a-pres_gen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_gen.cc' object='../src/libomega_a-pres_gen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_gen.o `test -f '../src/pres_gen.cc' || echo '$(srcdir)/'`../src/pres_gen.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_gen.o `test -f '../src/pres_gen.cc' || echo '$(srcdir)/'`../src/pres_gen.cc -libomega_a-pres_gen.obj: ../src/pres_gen.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_gen.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_gen.Tpo" -c -o libomega_a-pres_gen.obj `if test -f '../src/pres_gen.cc'; then $(CYGPATH_W) '../src/pres_gen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_gen.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_gen.Tpo" "$(DEPDIR)/libomega_a-pres_gen.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_gen.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_gen.cc' object='libomega_a-pres_gen.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_gen.obj: ../src/pres_gen.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_gen.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_gen.Tpo -c -o ../src/libomega_a-pres_gen.obj `if test -f '../src/pres_gen.cc'; then $(CYGPATH_W) '../src/pres_gen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_gen.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_gen.Tpo ../src/$(DEPDIR)/libomega_a-pres_gen.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_gen.cc' object='../src/libomega_a-pres_gen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_gen.obj `if test -f '../src/pres_gen.cc'; then $(CYGPATH_W) '../src/pres_gen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_gen.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_gen.obj `if test -f '../src/pres_gen.cc'; then $(CYGPATH_W) '../src/pres_gen.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_gen.cc'; fi` -libomega_a-pres_logic.o: ../src/pres_logic.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_logic.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_logic.Tpo" -c -o libomega_a-pres_logic.o `test -f '../src/pres_logic.cc' || echo '$(srcdir)/'`../src/pres_logic.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_logic.Tpo" "$(DEPDIR)/libomega_a-pres_logic.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_logic.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_logic.cc' object='libomega_a-pres_logic.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_logic.o: ../src/pres_logic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_logic.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_logic.Tpo -c -o ../src/libomega_a-pres_logic.o `test -f '../src/pres_logic.cc' || echo '$(srcdir)/'`../src/pres_logic.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_logic.Tpo ../src/$(DEPDIR)/libomega_a-pres_logic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_logic.cc' object='../src/libomega_a-pres_logic.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_logic.o `test -f '../src/pres_logic.cc' || echo '$(srcdir)/'`../src/pres_logic.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_logic.o `test -f '../src/pres_logic.cc' || echo '$(srcdir)/'`../src/pres_logic.cc -libomega_a-pres_logic.obj: ../src/pres_logic.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_logic.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_logic.Tpo" -c -o libomega_a-pres_logic.obj `if test -f '../src/pres_logic.cc'; then $(CYGPATH_W) '../src/pres_logic.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_logic.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_logic.Tpo" "$(DEPDIR)/libomega_a-pres_logic.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_logic.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_logic.cc' object='libomega_a-pres_logic.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_logic.obj: ../src/pres_logic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_logic.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_logic.Tpo -c -o ../src/libomega_a-pres_logic.obj `if test -f '../src/pres_logic.cc'; then $(CYGPATH_W) '../src/pres_logic.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_logic.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_logic.Tpo ../src/$(DEPDIR)/libomega_a-pres_logic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_logic.cc' object='../src/libomega_a-pres_logic.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_logic.obj `if test -f '../src/pres_logic.cc'; then $(CYGPATH_W) '../src/pres_logic.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_logic.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_logic.obj `if test -f '../src/pres_logic.cc'; then $(CYGPATH_W) '../src/pres_logic.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_logic.cc'; fi` -libomega_a-pres_print.o: ../src/pres_print.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_print.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_print.Tpo" -c -o libomega_a-pres_print.o `test -f '../src/pres_print.cc' || echo '$(srcdir)/'`../src/pres_print.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_print.Tpo" "$(DEPDIR)/libomega_a-pres_print.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_print.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_print.cc' object='libomega_a-pres_print.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_print.o: ../src/pres_print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_print.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_print.Tpo -c -o ../src/libomega_a-pres_print.o `test -f '../src/pres_print.cc' || echo '$(srcdir)/'`../src/pres_print.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_print.Tpo ../src/$(DEPDIR)/libomega_a-pres_print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_print.cc' object='../src/libomega_a-pres_print.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_print.o `test -f '../src/pres_print.cc' || echo '$(srcdir)/'`../src/pres_print.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_print.o `test -f '../src/pres_print.cc' || echo '$(srcdir)/'`../src/pres_print.cc -libomega_a-pres_print.obj: ../src/pres_print.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_print.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_print.Tpo" -c -o libomega_a-pres_print.obj `if test -f '../src/pres_print.cc'; then $(CYGPATH_W) '../src/pres_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_print.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_print.Tpo" "$(DEPDIR)/libomega_a-pres_print.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_print.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_print.cc' object='libomega_a-pres_print.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_print.obj: ../src/pres_print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_print.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_print.Tpo -c -o ../src/libomega_a-pres_print.obj `if test -f '../src/pres_print.cc'; then $(CYGPATH_W) '../src/pres_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_print.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_print.Tpo ../src/$(DEPDIR)/libomega_a-pres_print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_print.cc' object='../src/libomega_a-pres_print.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_print.obj `if test -f '../src/pres_print.cc'; then $(CYGPATH_W) '../src/pres_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_print.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_print.obj `if test -f '../src/pres_print.cc'; then $(CYGPATH_W) '../src/pres_print.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_print.cc'; fi` -libomega_a-pres_rear.o: ../src/pres_rear.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_rear.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_rear.Tpo" -c -o libomega_a-pres_rear.o `test -f '../src/pres_rear.cc' || echo '$(srcdir)/'`../src/pres_rear.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_rear.Tpo" "$(DEPDIR)/libomega_a-pres_rear.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_rear.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_rear.cc' object='libomega_a-pres_rear.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_rear.o: ../src/pres_rear.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_rear.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_rear.Tpo -c -o ../src/libomega_a-pres_rear.o `test -f '../src/pres_rear.cc' || echo '$(srcdir)/'`../src/pres_rear.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_rear.Tpo ../src/$(DEPDIR)/libomega_a-pres_rear.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_rear.cc' object='../src/libomega_a-pres_rear.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_rear.o `test -f '../src/pres_rear.cc' || echo '$(srcdir)/'`../src/pres_rear.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_rear.o `test -f '../src/pres_rear.cc' || echo '$(srcdir)/'`../src/pres_rear.cc -libomega_a-pres_rear.obj: ../src/pres_rear.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_rear.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_rear.Tpo" -c -o libomega_a-pres_rear.obj `if test -f '../src/pres_rear.cc'; then $(CYGPATH_W) '../src/pres_rear.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_rear.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_rear.Tpo" "$(DEPDIR)/libomega_a-pres_rear.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_rear.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_rear.cc' object='libomega_a-pres_rear.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_rear.obj: ../src/pres_rear.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_rear.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_rear.Tpo -c -o ../src/libomega_a-pres_rear.obj `if test -f '../src/pres_rear.cc'; then $(CYGPATH_W) '../src/pres_rear.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_rear.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_rear.Tpo ../src/$(DEPDIR)/libomega_a-pres_rear.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_rear.cc' object='../src/libomega_a-pres_rear.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_rear.obj `if test -f '../src/pres_rear.cc'; then $(CYGPATH_W) '../src/pres_rear.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_rear.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_rear.obj `if test -f '../src/pres_rear.cc'; then $(CYGPATH_W) '../src/pres_rear.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_rear.cc'; fi` -libomega_a-pres_quant.o: ../src/pres_quant.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_quant.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_quant.Tpo" -c -o libomega_a-pres_quant.o `test -f '../src/pres_quant.cc' || echo '$(srcdir)/'`../src/pres_quant.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_quant.Tpo" "$(DEPDIR)/libomega_a-pres_quant.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_quant.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_quant.cc' object='libomega_a-pres_quant.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_quant.o: ../src/pres_quant.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_quant.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_quant.Tpo -c -o ../src/libomega_a-pres_quant.o `test -f '../src/pres_quant.cc' || echo '$(srcdir)/'`../src/pres_quant.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_quant.Tpo ../src/$(DEPDIR)/libomega_a-pres_quant.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_quant.cc' object='../src/libomega_a-pres_quant.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_quant.o `test -f '../src/pres_quant.cc' || echo '$(srcdir)/'`../src/pres_quant.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_quant.o `test -f '../src/pres_quant.cc' || echo '$(srcdir)/'`../src/pres_quant.cc -libomega_a-pres_quant.obj: ../src/pres_quant.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_quant.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_quant.Tpo" -c -o libomega_a-pres_quant.obj `if test -f '../src/pres_quant.cc'; then $(CYGPATH_W) '../src/pres_quant.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_quant.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_quant.Tpo" "$(DEPDIR)/libomega_a-pres_quant.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_quant.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_quant.cc' object='libomega_a-pres_quant.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_quant.obj: ../src/pres_quant.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_quant.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_quant.Tpo -c -o ../src/libomega_a-pres_quant.obj `if test -f '../src/pres_quant.cc'; then $(CYGPATH_W) '../src/pres_quant.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_quant.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_quant.Tpo ../src/$(DEPDIR)/libomega_a-pres_quant.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_quant.cc' object='../src/libomega_a-pres_quant.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_quant.obj `if test -f '../src/pres_quant.cc'; then $(CYGPATH_W) '../src/pres_quant.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_quant.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_quant.obj `if test -f '../src/pres_quant.cc'; then $(CYGPATH_W) '../src/pres_quant.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_quant.cc'; fi` -libomega_a-pres_subs.o: ../src/pres_subs.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_subs.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_subs.Tpo" -c -o libomega_a-pres_subs.o `test -f '../src/pres_subs.cc' || echo '$(srcdir)/'`../src/pres_subs.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_subs.Tpo" "$(DEPDIR)/libomega_a-pres_subs.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_subs.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_subs.cc' object='libomega_a-pres_subs.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_subs.o: ../src/pres_subs.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_subs.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_subs.Tpo -c -o ../src/libomega_a-pres_subs.o `test -f '../src/pres_subs.cc' || echo '$(srcdir)/'`../src/pres_subs.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_subs.Tpo ../src/$(DEPDIR)/libomega_a-pres_subs.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_subs.cc' object='../src/libomega_a-pres_subs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_subs.o `test -f '../src/pres_subs.cc' || echo '$(srcdir)/'`../src/pres_subs.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_subs.o `test -f '../src/pres_subs.cc' || echo '$(srcdir)/'`../src/pres_subs.cc -libomega_a-pres_subs.obj: ../src/pres_subs.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_subs.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_subs.Tpo" -c -o libomega_a-pres_subs.obj `if test -f '../src/pres_subs.cc'; then $(CYGPATH_W) '../src/pres_subs.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_subs.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_subs.Tpo" "$(DEPDIR)/libomega_a-pres_subs.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_subs.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_subs.cc' object='libomega_a-pres_subs.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_subs.obj: ../src/pres_subs.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_subs.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_subs.Tpo -c -o ../src/libomega_a-pres_subs.obj `if test -f '../src/pres_subs.cc'; then $(CYGPATH_W) '../src/pres_subs.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_subs.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_subs.Tpo ../src/$(DEPDIR)/libomega_a-pres_subs.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_subs.cc' object='../src/libomega_a-pres_subs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_subs.obj `if test -f '../src/pres_subs.cc'; then $(CYGPATH_W) '../src/pres_subs.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_subs.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_subs.obj `if test -f '../src/pres_subs.cc'; then $(CYGPATH_W) '../src/pres_subs.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_subs.cc'; fi` -libomega_a-pres_var.o: ../src/pres_var.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_var.o -MD -MP -MF "$(DEPDIR)/libomega_a-pres_var.Tpo" -c -o libomega_a-pres_var.o `test -f '../src/pres_var.cc' || echo '$(srcdir)/'`../src/pres_var.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_var.Tpo" "$(DEPDIR)/libomega_a-pres_var.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_var.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_var.cc' object='libomega_a-pres_var.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_var.o: ../src/pres_var.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_var.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_var.Tpo -c -o ../src/libomega_a-pres_var.o `test -f '../src/pres_var.cc' || echo '$(srcdir)/'`../src/pres_var.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_var.Tpo ../src/$(DEPDIR)/libomega_a-pres_var.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_var.cc' object='../src/libomega_a-pres_var.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_var.o `test -f '../src/pres_var.cc' || echo '$(srcdir)/'`../src/pres_var.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_var.o `test -f '../src/pres_var.cc' || echo '$(srcdir)/'`../src/pres_var.cc -libomega_a-pres_var.obj: ../src/pres_var.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-pres_var.obj -MD -MP -MF "$(DEPDIR)/libomega_a-pres_var.Tpo" -c -o libomega_a-pres_var.obj `if test -f '../src/pres_var.cc'; then $(CYGPATH_W) '../src/pres_var.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_var.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-pres_var.Tpo" "$(DEPDIR)/libomega_a-pres_var.Po"; else rm -f "$(DEPDIR)/libomega_a-pres_var.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/pres_var.cc' object='libomega_a-pres_var.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-pres_var.obj: ../src/pres_var.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-pres_var.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-pres_var.Tpo -c -o ../src/libomega_a-pres_var.obj `if test -f '../src/pres_var.cc'; then $(CYGPATH_W) '../src/pres_var.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_var.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-pres_var.Tpo ../src/$(DEPDIR)/libomega_a-pres_var.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/pres_var.cc' object='../src/libomega_a-pres_var.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-pres_var.obj `if test -f '../src/pres_var.cc'; then $(CYGPATH_W) '../src/pres_var.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_var.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-pres_var.obj `if test -f '../src/pres_var.cc'; then $(CYGPATH_W) '../src/pres_var.cc'; else $(CYGPATH_W) '$(srcdir)/../src/pres_var.cc'; fi` -libomega_a-evac.o: ../src/evac.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-evac.o -MD -MP -MF "$(DEPDIR)/libomega_a-evac.Tpo" -c -o libomega_a-evac.o `test -f '../src/evac.cc' || echo '$(srcdir)/'`../src/evac.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-evac.Tpo" "$(DEPDIR)/libomega_a-evac.Po"; else rm -f "$(DEPDIR)/libomega_a-evac.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/evac.cc' object='libomega_a-evac.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-evac.o: ../src/evac.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-evac.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-evac.Tpo -c -o ../src/libomega_a-evac.o `test -f '../src/evac.cc' || echo '$(srcdir)/'`../src/evac.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-evac.Tpo ../src/$(DEPDIR)/libomega_a-evac.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/evac.cc' object='../src/libomega_a-evac.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-evac.o `test -f '../src/evac.cc' || echo '$(srcdir)/'`../src/evac.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-evac.o `test -f '../src/evac.cc' || echo '$(srcdir)/'`../src/evac.cc -libomega_a-evac.obj: ../src/evac.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-evac.obj -MD -MP -MF "$(DEPDIR)/libomega_a-evac.Tpo" -c -o libomega_a-evac.obj `if test -f '../src/evac.cc'; then $(CYGPATH_W) '../src/evac.cc'; else $(CYGPATH_W) '$(srcdir)/../src/evac.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-evac.Tpo" "$(DEPDIR)/libomega_a-evac.Po"; else rm -f "$(DEPDIR)/libomega_a-evac.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/evac.cc' object='libomega_a-evac.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-evac.obj: ../src/evac.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-evac.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-evac.Tpo -c -o ../src/libomega_a-evac.obj `if test -f '../src/evac.cc'; then $(CYGPATH_W) '../src/evac.cc'; else $(CYGPATH_W) '$(srcdir)/../src/evac.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-evac.Tpo ../src/$(DEPDIR)/libomega_a-evac.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/evac.cc' object='../src/libomega_a-evac.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-evac.obj `if test -f '../src/evac.cc'; then $(CYGPATH_W) '../src/evac.cc'; else $(CYGPATH_W) '$(srcdir)/../src/evac.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-evac.obj `if test -f '../src/evac.cc'; then $(CYGPATH_W) '../src/evac.cc'; else $(CYGPATH_W) '$(srcdir)/../src/evac.cc'; fi` -libomega_a-farkas.o: ../src/farkas.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-farkas.o -MD -MP -MF "$(DEPDIR)/libomega_a-farkas.Tpo" -c -o libomega_a-farkas.o `test -f '../src/farkas.cc' || echo '$(srcdir)/'`../src/farkas.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-farkas.Tpo" "$(DEPDIR)/libomega_a-farkas.Po"; else rm -f "$(DEPDIR)/libomega_a-farkas.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/farkas.cc' object='libomega_a-farkas.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-farkas.o: ../src/farkas.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-farkas.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-farkas.Tpo -c -o ../src/libomega_a-farkas.o `test -f '../src/farkas.cc' || echo '$(srcdir)/'`../src/farkas.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-farkas.Tpo ../src/$(DEPDIR)/libomega_a-farkas.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/farkas.cc' object='../src/libomega_a-farkas.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-farkas.o `test -f '../src/farkas.cc' || echo '$(srcdir)/'`../src/farkas.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-farkas.o `test -f '../src/farkas.cc' || echo '$(srcdir)/'`../src/farkas.cc -libomega_a-farkas.obj: ../src/farkas.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-farkas.obj -MD -MP -MF "$(DEPDIR)/libomega_a-farkas.Tpo" -c -o libomega_a-farkas.obj `if test -f '../src/farkas.cc'; then $(CYGPATH_W) '../src/farkas.cc'; else $(CYGPATH_W) '$(srcdir)/../src/farkas.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-farkas.Tpo" "$(DEPDIR)/libomega_a-farkas.Po"; else rm -f "$(DEPDIR)/libomega_a-farkas.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/farkas.cc' object='libomega_a-farkas.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-farkas.obj: ../src/farkas.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-farkas.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-farkas.Tpo -c -o ../src/libomega_a-farkas.obj `if test -f '../src/farkas.cc'; then $(CYGPATH_W) '../src/farkas.cc'; else $(CYGPATH_W) '$(srcdir)/../src/farkas.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-farkas.Tpo ../src/$(DEPDIR)/libomega_a-farkas.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/farkas.cc' object='../src/libomega_a-farkas.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-farkas.obj `if test -f '../src/farkas.cc'; then $(CYGPATH_W) '../src/farkas.cc'; else $(CYGPATH_W) '$(srcdir)/../src/farkas.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-farkas.obj `if test -f '../src/farkas.cc'; then $(CYGPATH_W) '../src/farkas.cc'; else $(CYGPATH_W) '$(srcdir)/../src/farkas.cc'; fi` -libomega_a-hull_legacy.o: ../src/hull_legacy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-hull_legacy.o -MD -MP -MF "$(DEPDIR)/libomega_a-hull_legacy.Tpo" -c -o libomega_a-hull_legacy.o `test -f '../src/hull_legacy.cc' || echo '$(srcdir)/'`../src/hull_legacy.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-hull_legacy.Tpo" "$(DEPDIR)/libomega_a-hull_legacy.Po"; else rm -f "$(DEPDIR)/libomega_a-hull_legacy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/hull_legacy.cc' object='libomega_a-hull_legacy.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-hull_legacy.o: ../src/hull_legacy.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-hull_legacy.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-hull_legacy.Tpo -c -o ../src/libomega_a-hull_legacy.o `test -f '../src/hull_legacy.cc' || echo '$(srcdir)/'`../src/hull_legacy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-hull_legacy.Tpo ../src/$(DEPDIR)/libomega_a-hull_legacy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/hull_legacy.cc' object='../src/libomega_a-hull_legacy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-hull_legacy.o `test -f '../src/hull_legacy.cc' || echo '$(srcdir)/'`../src/hull_legacy.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-hull_legacy.o `test -f '../src/hull_legacy.cc' || echo '$(srcdir)/'`../src/hull_legacy.cc -libomega_a-hull_legacy.obj: ../src/hull_legacy.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-hull_legacy.obj -MD -MP -MF "$(DEPDIR)/libomega_a-hull_legacy.Tpo" -c -o libomega_a-hull_legacy.obj `if test -f '../src/hull_legacy.cc'; then $(CYGPATH_W) '../src/hull_legacy.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_legacy.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-hull_legacy.Tpo" "$(DEPDIR)/libomega_a-hull_legacy.Po"; else rm -f "$(DEPDIR)/libomega_a-hull_legacy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/hull_legacy.cc' object='libomega_a-hull_legacy.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-hull_legacy.obj: ../src/hull_legacy.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-hull_legacy.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-hull_legacy.Tpo -c -o ../src/libomega_a-hull_legacy.obj `if test -f '../src/hull_legacy.cc'; then $(CYGPATH_W) '../src/hull_legacy.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_legacy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-hull_legacy.Tpo ../src/$(DEPDIR)/libomega_a-hull_legacy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/hull_legacy.cc' object='../src/libomega_a-hull_legacy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-hull_legacy.obj `if test -f '../src/hull_legacy.cc'; then $(CYGPATH_W) '../src/hull_legacy.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_legacy.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-hull_legacy.obj `if test -f '../src/hull_legacy.cc'; then $(CYGPATH_W) '../src/hull_legacy.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_legacy.cc'; fi` -libomega_a-hull_simple.o: ../src/hull_simple.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-hull_simple.o -MD -MP -MF "$(DEPDIR)/libomega_a-hull_simple.Tpo" -c -o libomega_a-hull_simple.o `test -f '../src/hull_simple.cc' || echo '$(srcdir)/'`../src/hull_simple.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-hull_simple.Tpo" "$(DEPDIR)/libomega_a-hull_simple.Po"; else rm -f "$(DEPDIR)/libomega_a-hull_simple.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/hull_simple.cc' object='libomega_a-hull_simple.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-hull_simple.o: ../src/hull_simple.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-hull_simple.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-hull_simple.Tpo -c -o ../src/libomega_a-hull_simple.o `test -f '../src/hull_simple.cc' || echo '$(srcdir)/'`../src/hull_simple.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-hull_simple.Tpo ../src/$(DEPDIR)/libomega_a-hull_simple.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/hull_simple.cc' object='../src/libomega_a-hull_simple.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-hull_simple.o `test -f '../src/hull_simple.cc' || echo '$(srcdir)/'`../src/hull_simple.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-hull_simple.o `test -f '../src/hull_simple.cc' || echo '$(srcdir)/'`../src/hull_simple.cc -libomega_a-hull_simple.obj: ../src/hull_simple.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-hull_simple.obj -MD -MP -MF "$(DEPDIR)/libomega_a-hull_simple.Tpo" -c -o libomega_a-hull_simple.obj `if test -f '../src/hull_simple.cc'; then $(CYGPATH_W) '../src/hull_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_simple.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-hull_simple.Tpo" "$(DEPDIR)/libomega_a-hull_simple.Po"; else rm -f "$(DEPDIR)/libomega_a-hull_simple.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/hull_simple.cc' object='libomega_a-hull_simple.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-hull_simple.obj: ../src/hull_simple.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-hull_simple.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-hull_simple.Tpo -c -o ../src/libomega_a-hull_simple.obj `if test -f '../src/hull_simple.cc'; then $(CYGPATH_W) '../src/hull_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_simple.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-hull_simple.Tpo ../src/$(DEPDIR)/libomega_a-hull_simple.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/hull_simple.cc' object='../src/libomega_a-hull_simple.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-hull_simple.obj `if test -f '../src/hull_simple.cc'; then $(CYGPATH_W) '../src/hull_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_simple.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-hull_simple.obj `if test -f '../src/hull_simple.cc'; then $(CYGPATH_W) '../src/hull_simple.cc'; else $(CYGPATH_W) '$(srcdir)/../src/hull_simple.cc'; fi` -libomega_a-Relation.o: ../src/Relation.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-Relation.o -MD -MP -MF "$(DEPDIR)/libomega_a-Relation.Tpo" -c -o libomega_a-Relation.o `test -f '../src/Relation.cc' || echo '$(srcdir)/'`../src/Relation.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-Relation.Tpo" "$(DEPDIR)/libomega_a-Relation.Po"; else rm -f "$(DEPDIR)/libomega_a-Relation.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/Relation.cc' object='libomega_a-Relation.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-Relation.o: ../src/Relation.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-Relation.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-Relation.Tpo -c -o ../src/libomega_a-Relation.o `test -f '../src/Relation.cc' || echo '$(srcdir)/'`../src/Relation.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-Relation.Tpo ../src/$(DEPDIR)/libomega_a-Relation.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/Relation.cc' object='../src/libomega_a-Relation.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-Relation.o `test -f '../src/Relation.cc' || echo '$(srcdir)/'`../src/Relation.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-Relation.o `test -f '../src/Relation.cc' || echo '$(srcdir)/'`../src/Relation.cc -libomega_a-Relation.obj: ../src/Relation.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-Relation.obj -MD -MP -MF "$(DEPDIR)/libomega_a-Relation.Tpo" -c -o libomega_a-Relation.obj `if test -f '../src/Relation.cc'; then $(CYGPATH_W) '../src/Relation.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relation.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-Relation.Tpo" "$(DEPDIR)/libomega_a-Relation.Po"; else rm -f "$(DEPDIR)/libomega_a-Relation.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/Relation.cc' object='libomega_a-Relation.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-Relation.obj: ../src/Relation.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-Relation.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-Relation.Tpo -c -o ../src/libomega_a-Relation.obj `if test -f '../src/Relation.cc'; then $(CYGPATH_W) '../src/Relation.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relation.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-Relation.Tpo ../src/$(DEPDIR)/libomega_a-Relation.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/Relation.cc' object='../src/libomega_a-Relation.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-Relation.obj `if test -f '../src/Relation.cc'; then $(CYGPATH_W) '../src/Relation.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relation.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-Relation.obj `if test -f '../src/Relation.cc'; then $(CYGPATH_W) '../src/Relation.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relation.cc'; fi` -libomega_a-Relations.o: ../src/Relations.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-Relations.o -MD -MP -MF "$(DEPDIR)/libomega_a-Relations.Tpo" -c -o libomega_a-Relations.o `test -f '../src/Relations.cc' || echo '$(srcdir)/'`../src/Relations.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-Relations.Tpo" "$(DEPDIR)/libomega_a-Relations.Po"; else rm -f "$(DEPDIR)/libomega_a-Relations.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/Relations.cc' object='libomega_a-Relations.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-Relations.o: ../src/Relations.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-Relations.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-Relations.Tpo -c -o ../src/libomega_a-Relations.o `test -f '../src/Relations.cc' || echo '$(srcdir)/'`../src/Relations.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-Relations.Tpo ../src/$(DEPDIR)/libomega_a-Relations.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/Relations.cc' object='../src/libomega_a-Relations.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-Relations.o `test -f '../src/Relations.cc' || echo '$(srcdir)/'`../src/Relations.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-Relations.o `test -f '../src/Relations.cc' || echo '$(srcdir)/'`../src/Relations.cc -libomega_a-Relations.obj: ../src/Relations.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-Relations.obj -MD -MP -MF "$(DEPDIR)/libomega_a-Relations.Tpo" -c -o libomega_a-Relations.obj `if test -f '../src/Relations.cc'; then $(CYGPATH_W) '../src/Relations.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relations.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-Relations.Tpo" "$(DEPDIR)/libomega_a-Relations.Po"; else rm -f "$(DEPDIR)/libomega_a-Relations.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/Relations.cc' object='libomega_a-Relations.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-Relations.obj: ../src/Relations.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-Relations.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-Relations.Tpo -c -o ../src/libomega_a-Relations.obj `if test -f '../src/Relations.cc'; then $(CYGPATH_W) '../src/Relations.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relations.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-Relations.Tpo ../src/$(DEPDIR)/libomega_a-Relations.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/Relations.cc' object='../src/libomega_a-Relations.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-Relations.obj `if test -f '../src/Relations.cc'; then $(CYGPATH_W) '../src/Relations.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relations.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-Relations.obj `if test -f '../src/Relations.cc'; then $(CYGPATH_W) '../src/Relations.cc'; else $(CYGPATH_W) '$(srcdir)/../src/Relations.cc'; fi` -libomega_a-RelBody.o: ../src/RelBody.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-RelBody.o -MD -MP -MF "$(DEPDIR)/libomega_a-RelBody.Tpo" -c -o libomega_a-RelBody.o `test -f '../src/RelBody.cc' || echo '$(srcdir)/'`../src/RelBody.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-RelBody.Tpo" "$(DEPDIR)/libomega_a-RelBody.Po"; else rm -f "$(DEPDIR)/libomega_a-RelBody.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/RelBody.cc' object='libomega_a-RelBody.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-RelBody.o: ../src/RelBody.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-RelBody.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-RelBody.Tpo -c -o ../src/libomega_a-RelBody.o `test -f '../src/RelBody.cc' || echo '$(srcdir)/'`../src/RelBody.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-RelBody.Tpo ../src/$(DEPDIR)/libomega_a-RelBody.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/RelBody.cc' object='../src/libomega_a-RelBody.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-RelBody.o `test -f '../src/RelBody.cc' || echo '$(srcdir)/'`../src/RelBody.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-RelBody.o `test -f '../src/RelBody.cc' || echo '$(srcdir)/'`../src/RelBody.cc -libomega_a-RelBody.obj: ../src/RelBody.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-RelBody.obj -MD -MP -MF "$(DEPDIR)/libomega_a-RelBody.Tpo" -c -o libomega_a-RelBody.obj `if test -f '../src/RelBody.cc'; then $(CYGPATH_W) '../src/RelBody.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelBody.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-RelBody.Tpo" "$(DEPDIR)/libomega_a-RelBody.Po"; else rm -f "$(DEPDIR)/libomega_a-RelBody.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/RelBody.cc' object='libomega_a-RelBody.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-RelBody.obj: ../src/RelBody.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-RelBody.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-RelBody.Tpo -c -o ../src/libomega_a-RelBody.obj `if test -f '../src/RelBody.cc'; then $(CYGPATH_W) '../src/RelBody.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelBody.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-RelBody.Tpo ../src/$(DEPDIR)/libomega_a-RelBody.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/RelBody.cc' object='../src/libomega_a-RelBody.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-RelBody.obj `if test -f '../src/RelBody.cc'; then $(CYGPATH_W) '../src/RelBody.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelBody.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-RelBody.obj `if test -f '../src/RelBody.cc'; then $(CYGPATH_W) '../src/RelBody.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelBody.cc'; fi` -libomega_a-RelVar.o: ../src/RelVar.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-RelVar.o -MD -MP -MF "$(DEPDIR)/libomega_a-RelVar.Tpo" -c -o libomega_a-RelVar.o `test -f '../src/RelVar.cc' || echo '$(srcdir)/'`../src/RelVar.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-RelVar.Tpo" "$(DEPDIR)/libomega_a-RelVar.Po"; else rm -f "$(DEPDIR)/libomega_a-RelVar.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/RelVar.cc' object='libomega_a-RelVar.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-RelVar.o: ../src/RelVar.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-RelVar.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-RelVar.Tpo -c -o ../src/libomega_a-RelVar.o `test -f '../src/RelVar.cc' || echo '$(srcdir)/'`../src/RelVar.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-RelVar.Tpo ../src/$(DEPDIR)/libomega_a-RelVar.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/RelVar.cc' object='../src/libomega_a-RelVar.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-RelVar.o `test -f '../src/RelVar.cc' || echo '$(srcdir)/'`../src/RelVar.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-RelVar.o `test -f '../src/RelVar.cc' || echo '$(srcdir)/'`../src/RelVar.cc -libomega_a-RelVar.obj: ../src/RelVar.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-RelVar.obj -MD -MP -MF "$(DEPDIR)/libomega_a-RelVar.Tpo" -c -o libomega_a-RelVar.obj `if test -f '../src/RelVar.cc'; then $(CYGPATH_W) '../src/RelVar.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelVar.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-RelVar.Tpo" "$(DEPDIR)/libomega_a-RelVar.Po"; else rm -f "$(DEPDIR)/libomega_a-RelVar.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/RelVar.cc' object='libomega_a-RelVar.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-RelVar.obj: ../src/RelVar.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-RelVar.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-RelVar.Tpo -c -o ../src/libomega_a-RelVar.obj `if test -f '../src/RelVar.cc'; then $(CYGPATH_W) '../src/RelVar.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelVar.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-RelVar.Tpo ../src/$(DEPDIR)/libomega_a-RelVar.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/RelVar.cc' object='../src/libomega_a-RelVar.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-RelVar.obj `if test -f '../src/RelVar.cc'; then $(CYGPATH_W) '../src/RelVar.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelVar.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-RelVar.obj `if test -f '../src/RelVar.cc'; then $(CYGPATH_W) '../src/RelVar.cc'; else $(CYGPATH_W) '$(srcdir)/../src/RelVar.cc'; fi` -libomega_a-closure.o: ../src/closure.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-closure.o -MD -MP -MF "$(DEPDIR)/libomega_a-closure.Tpo" -c -o libomega_a-closure.o `test -f '../src/closure.cc' || echo '$(srcdir)/'`../src/closure.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-closure.Tpo" "$(DEPDIR)/libomega_a-closure.Po"; else rm -f "$(DEPDIR)/libomega_a-closure.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/closure.cc' object='libomega_a-closure.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-closure.o: ../src/closure.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-closure.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-closure.Tpo -c -o ../src/libomega_a-closure.o `test -f '../src/closure.cc' || echo '$(srcdir)/'`../src/closure.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-closure.Tpo ../src/$(DEPDIR)/libomega_a-closure.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/closure.cc' object='../src/libomega_a-closure.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-closure.o `test -f '../src/closure.cc' || echo '$(srcdir)/'`../src/closure.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-closure.o `test -f '../src/closure.cc' || echo '$(srcdir)/'`../src/closure.cc -libomega_a-closure.obj: ../src/closure.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-closure.obj -MD -MP -MF "$(DEPDIR)/libomega_a-closure.Tpo" -c -o libomega_a-closure.obj `if test -f '../src/closure.cc'; then $(CYGPATH_W) '../src/closure.cc'; else $(CYGPATH_W) '$(srcdir)/../src/closure.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-closure.Tpo" "$(DEPDIR)/libomega_a-closure.Po"; else rm -f "$(DEPDIR)/libomega_a-closure.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/closure.cc' object='libomega_a-closure.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-closure.obj: ../src/closure.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-closure.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-closure.Tpo -c -o ../src/libomega_a-closure.obj `if test -f '../src/closure.cc'; then $(CYGPATH_W) '../src/closure.cc'; else $(CYGPATH_W) '$(srcdir)/../src/closure.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-closure.Tpo ../src/$(DEPDIR)/libomega_a-closure.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/closure.cc' object='../src/libomega_a-closure.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-closure.obj `if test -f '../src/closure.cc'; then $(CYGPATH_W) '../src/closure.cc'; else $(CYGPATH_W) '$(srcdir)/../src/closure.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-closure.obj `if test -f '../src/closure.cc'; then $(CYGPATH_W) '../src/closure.cc'; else $(CYGPATH_W) '$(srcdir)/../src/closure.cc'; fi` -libomega_a-reach.o: ../src/reach.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-reach.o -MD -MP -MF "$(DEPDIR)/libomega_a-reach.Tpo" -c -o libomega_a-reach.o `test -f '../src/reach.cc' || echo '$(srcdir)/'`../src/reach.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-reach.Tpo" "$(DEPDIR)/libomega_a-reach.Po"; else rm -f "$(DEPDIR)/libomega_a-reach.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/reach.cc' object='libomega_a-reach.o' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-reach.o: ../src/reach.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-reach.o -MD -MP -MF ../src/$(DEPDIR)/libomega_a-reach.Tpo -c -o ../src/libomega_a-reach.o `test -f '../src/reach.cc' || echo '$(srcdir)/'`../src/reach.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-reach.Tpo ../src/$(DEPDIR)/libomega_a-reach.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/reach.cc' object='../src/libomega_a-reach.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-reach.o `test -f '../src/reach.cc' || echo '$(srcdir)/'`../src/reach.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-reach.o `test -f '../src/reach.cc' || echo '$(srcdir)/'`../src/reach.cc -libomega_a-reach.obj: ../src/reach.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libomega_a-reach.obj -MD -MP -MF "$(DEPDIR)/libomega_a-reach.Tpo" -c -o libomega_a-reach.obj `if test -f '../src/reach.cc'; then $(CYGPATH_W) '../src/reach.cc'; else $(CYGPATH_W) '$(srcdir)/../src/reach.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libomega_a-reach.Tpo" "$(DEPDIR)/libomega_a-reach.Po"; else rm -f "$(DEPDIR)/libomega_a-reach.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../src/reach.cc' object='libomega_a-reach.obj' libtool=no @AMDEPBACKSLASH@ +../src/libomega_a-reach.obj: ../src/reach.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ../src/libomega_a-reach.obj -MD -MP -MF ../src/$(DEPDIR)/libomega_a-reach.Tpo -c -o ../src/libomega_a-reach.obj `if test -f '../src/reach.cc'; then $(CYGPATH_W) '../src/reach.cc'; else $(CYGPATH_W) '$(srcdir)/../src/reach.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/libomega_a-reach.Tpo ../src/$(DEPDIR)/libomega_a-reach.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../src/reach.cc' object='../src/libomega_a-reach.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libomega_a-reach.obj `if test -f '../src/reach.cc'; then $(CYGPATH_W) '../src/reach.cc'; else $(CYGPATH_W) '$(srcdir)/../src/reach.cc'; fi` -uninstall-info-am: +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libomega_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../src/libomega_a-reach.obj `if test -f '../src/reach.cc'; then $(CYGPATH_W) '../src/reach.cc'; else $(CYGPATH_W) '$(srcdir)/../src/reach.cc'; fi` -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -908,16 +1141,28 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f ../../basic/src/$(DEPDIR)/$(am__dirstamp) + -rm -f ../../basic/src/$(am__dirstamp) + -rm -f ../src/$(DEPDIR)/$(am__dirstamp) + -rm -f ../src/$(am__dirstamp) + -rm -f ../src/omega_core/$(DEPDIR)/$(am__dirstamp) + -rm -f ../src/omega_core/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -927,7 +1172,7 @@ clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../../basic/src/$(DEPDIR) ../src/$(DEPDIR) ../src/omega_core/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -938,22 +1183,42 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../../basic/src/$(DEPDIR) ../src/$(DEPDIR) ../src/omega_core/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -969,18 +1234,23 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/orig_loop_datacopy.cc b/orig_loop_datacopy.cc deleted file mode 100644 index 04741bc..0000000 --- a/orig_loop_datacopy.cc +++ /dev/null @@ -1,1175 +0,0 @@ -/***************************************************************************** - Copyright (C) 2008 University of Southern California - Copyright (C) 2009-2010 University of Utah - All Rights Reserved. - - Purpose: - Various data copy schemes. - - Notes: - - History: - 02/20/09 Created by Chun Chen by splitting original datacopy from loop.cc -*****************************************************************************/ - -#include <code_gen/code_gen.h> -#include <code_gen/output_repr.h> -#include "loop.hh" -#include "omegatools.hh" -#include "ir_code.hh" -#include "chill_error.hh" - -using namespace omega; - -// -// data copy function by referring arrays by numbers. -// e.g. A[i] = A[i-1] + B[i] -// parameter array_ref_num=[0,2] means to copy data touched by A[i-1] and A[i] -// -bool Loop::datacopy(const std::vector<std::pair<int, std::vector<int> > > &array_ref_nums, int level, - bool allow_extra_read, int fastest_changing_dimension, int padding_stride, int padding_alignment, int memory_type) { - // check for sanity of parameters - std::set<int> same_loop; - for (int i = 0; i < array_ref_nums.size(); i++) { - int stmt_num = array_ref_nums[i].first; - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - if (i == 0) { - std::vector<int> lex = getLexicalOrder(stmt_num); - same_loop = getStatements(lex, 2*level-2); - } - else if (same_loop.find(stmt_num) == same_loop.end()) - throw std::invalid_argument("array references for data copy must be located in the same subloop"); - } - - // convert array reference numbering scheme to actual array references - std::vector<std::pair<int, std::vector<IR_ArrayRef *> > > selected_refs; - for (int i = 0; i < array_ref_nums.size(); i++) { - if (array_ref_nums[i].second.size() == 0) - continue; - - int stmt_num = array_ref_nums[i].first; - selected_refs.push_back(std::make_pair(stmt_num, std::vector<IR_ArrayRef *>())); - std::vector<IR_ArrayRef *> refs = ir->FindArrayRef(stmt[stmt_num].code); - std::vector<bool> selected(refs.size(), false); - for (int j = 0; j < array_ref_nums[i].second.size(); j++) { - int ref_num = array_ref_nums[i].second[j]; - if (ref_num < 0 || ref_num >= refs.size()) { - for (int k = 0; k < refs.size(); k++) - delete refs[k]; - throw std::invalid_argument("invalid array reference number " + to_string(ref_num) + " in statement " + to_string(stmt_num)); - } - selected_refs[selected_refs.size()-1].second.push_back(refs[ref_num]); - selected[ref_num] = true; - } - for (int j = 0; j < refs.size(); j++) - if (!selected[j]) - delete refs[j]; - } - if (selected_refs.size() == 0) - throw std::invalid_argument("found no array references to copy"); - - // do the copy - return datacopy_privatized(selected_refs, level, std::vector<int>(), allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, memory_type); -} - -// -// data copy function by referring arrays by name. -// e.g. A[i] = A[i-1] + B[i] -// parameter array_name=A means to copy data touched by A[i-1] and A[i] -// -bool Loop::datacopy(int stmt_num, int level, const std::string &array_name, - bool allow_extra_read, int fastest_changing_dimension, int padding_stride, int padding_alignment, int memory_type) { - // check for sanity of parameters - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - // collect array references by name - std::vector<int> lex = getLexicalOrder(stmt_num); - int dim = 2*level - 1; - std::set<int> same_loop = getStatements(lex, dim-1); - - std::vector<std::pair<int, std::vector<IR_ArrayRef *> > > selected_refs; - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - std::vector<IR_ArrayRef *> t; - std::vector<IR_ArrayRef *> refs = ir->FindArrayRef(stmt[*i].code); - for (int j = 0; j < refs.size(); j++) - if (refs[j]->name() == array_name) - t.push_back(refs[j]); - else - delete refs[j]; - if (t.size() != 0) - selected_refs.push_back(std::make_pair(*i, t)); - } - if (selected_refs.size() == 0) - throw std::invalid_argument("found no array references with name " + to_string(array_name) + " to copy"); - - // do the copy - return datacopy_privatized(selected_refs, level, std::vector<int>(), allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, memory_type); -} - - -bool Loop::datacopy_privatized(int stmt_num, int level, const std::string &array_name, const std::vector<int> &privatized_levels, - bool allow_extra_read, int fastest_changing_dimension, int padding_stride, int padding_alignment, int memory_type) { - // check for sanity of parameters - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - - // collect array references by name - std::vector<int> lex = getLexicalOrder(stmt_num); - int dim = 2*level - 1; - std::set<int> same_loop = getStatements(lex, dim-1); - - std::vector<std::pair<int, std::vector<IR_ArrayRef *> > > selected_refs; - for (std::set<int>::iterator i = same_loop.begin(); i != same_loop.end(); i++) { - selected_refs.push_back(std::make_pair(*i, std::vector<IR_ArrayRef *>())); - - std::vector<IR_ArrayRef *> refs = ir->FindArrayRef(stmt[*i].code); - for (int j = 0; j < refs.size(); j++) - if (refs[j]->name() == array_name) - selected_refs[selected_refs.size()-1].second.push_back(refs[j]); - else - delete refs[j]; - } - if (selected_refs.size() == 0) - throw std::invalid_argument("found no array references with name " + to_string(array_name) + " to copy"); - - // do the copy - return datacopy_privatized(selected_refs, level, privatized_levels, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, memory_type); -} - - -bool Loop::datacopy_privatized(const std::vector<std::pair<int, std::vector<int> > > &array_ref_nums, int level, const std::vector<int> &privatized_levels, bool allow_extra_read, int fastest_changing_dimension, int padding_stride, int padding_alignment, int memory_type) { - // check for sanity of parameters - std::set<int> same_loop; - for (int i = 0; i < array_ref_nums.size(); i++) { - int stmt_num = array_ref_nums[i].first; - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(stmt_num)); - if (level <= 0 || level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level)); - if (i == 0) { - std::vector<int> lex = getLexicalOrder(stmt_num); - same_loop = getStatements(lex, 2*level-2); - } - else if (same_loop.find(stmt_num) == same_loop.end()) - throw std::invalid_argument("array references for data copy must be located in the same subloop"); - } - - // convert array reference numbering scheme to actual array references - std::vector<std::pair<int, std::vector<IR_ArrayRef *> > > selected_refs; - for (int i = 0; i < array_ref_nums.size(); i++) { - if (array_ref_nums[i].second.size() == 0) - continue; - - int stmt_num = array_ref_nums[i].first; - selected_refs.push_back(std::make_pair(stmt_num, std::vector<IR_ArrayRef *>())); - std::vector<IR_ArrayRef *> refs = ir->FindArrayRef(stmt[stmt_num].code); - std::vector<bool> selected(refs.size(), false); - for (int j = 0; j < array_ref_nums[i].second.size(); j++) { - int ref_num = array_ref_nums[i].second[j]; - if (ref_num < 0 || ref_num >= refs.size()) { - for (int k = 0; k < refs.size(); k++) - delete refs[k]; - throw std::invalid_argument("invalid array reference number " + to_string(ref_num) + " in statement " + to_string(stmt_num)); - } - selected_refs[selected_refs.size()-1].second.push_back(refs[ref_num]); - selected[ref_num] = true; - } - for (int j = 0; j < refs.size(); j++) - if (!selected[j]) - delete refs[j]; - } - if (selected_refs.size() == 0) - throw std::invalid_argument("found no array references to copy"); - - // do the copy - return datacopy_privatized(selected_refs, level, privatized_levels, allow_extra_read, fastest_changing_dimension, padding_stride, padding_alignment, memory_type); -} - - -// -// Implement low level datacopy function with lots of options. -// -bool Loop::datacopy_privatized(const std::vector<std::pair<int, std::vector<IR_ArrayRef *> > > &stmt_refs, int level, - const std::vector<int> &privatized_levels, - bool allow_extra_read, int fastest_changing_dimension, - int padding_stride, int padding_alignment, int memory_type) { - if (stmt_refs.size() == 0) - return true; - - // check for sanity of parameters - IR_ArraySymbol *sym = NULL; - std::vector<int> lex; - std::set<int> active; - if (level <= 0) - throw std::invalid_argument("invalid loop level " + to_string(level)); - for (int i = 0; i < privatized_levels.size(); i++) { - if (i == 0) { - if (privatized_levels[i] < level) - throw std::invalid_argument("privatized loop levels must be no less than level " + to_string(level)); - } - else if (privatized_levels[i] <= privatized_levels[i-1]) - throw std::invalid_argument("privatized loop levels must be in ascending order"); - } - for (int i = 0; i < stmt_refs.size(); i++) { - int stmt_num = stmt_refs[i].first; - active.insert(stmt_num); - if (stmt_num < 0 || stmt_num >= stmt.size()) - throw std::invalid_argument("invalid statement number " + to_string(stmt_num)); - if (privatized_levels.size() != 0) { - if (privatized_levels[privatized_levels.size()-1] > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(privatized_levels[privatized_levels.size()-1]) + " for statement " + to_string(stmt_num)); - } - else { - if (level > stmt[stmt_num].loop_level.size()) - throw std::invalid_argument("invalid loop level " + to_string(level) + " for statement " + to_string(stmt_num)); - } - for (int j = 0; j < stmt_refs[i].second.size(); j++) { - if (sym == NULL) { - sym = stmt_refs[i].second[j]->symbol(); - lex = getLexicalOrder(stmt_num); - } - else { - IR_ArraySymbol *t = stmt_refs[i].second[j]->symbol(); - if (t->name() != sym->name()) { - delete t; - delete sym; - throw std::invalid_argument("try to copy data from different arrays"); - } - delete t; - } - } - } - if (!(fastest_changing_dimension >= -1 && fastest_changing_dimension < sym->n_dim())) - throw std::invalid_argument("invalid fastest changing dimension for the array to be copied"); - if (padding_stride < 0) - throw std::invalid_argument("invalid temporary array stride requirement"); - if (padding_alignment == -1 || padding_alignment == 0) - throw std::invalid_argument("invalid temporary array alignment requirement"); - - int dim = 2*level - 1; - int n_dim = sym->n_dim(); - - if (fastest_changing_dimension == -1) - switch (sym->layout_type()) { - case IR_ARRAY_LAYOUT_ROW_MAJOR: - fastest_changing_dimension = n_dim - 1; - break; - case IR_ARRAY_LAYOUT_COLUMN_MAJOR: - fastest_changing_dimension = 0; - break; - default: - throw loop_error("unsupported array layout"); - } - - - // build iteration spaces for all reads and for all writes separately - apply_xform(active); - bool has_write_refs = false; - bool has_read_refs = false; - Relation wo_copy_is = Relation::False(level-1+privatized_levels.size()+n_dim); - Relation ro_copy_is = Relation::False(level-1+privatized_levels.size()+n_dim); - for (int i = 0; i < stmt_refs.size(); i++) { - int stmt_num = stmt_refs[i].first; - - for (int j = 0; j < stmt_refs[i].second.size(); j++) { - Relation mapping(stmt[stmt_num].IS.n_set(), level-1+privatized_levels.size()+n_dim); - for (int k = 1; k <= mapping.n_inp(); k++) - mapping.name_input_var(k, stmt[stmt_num].IS.set_var(k)->name()); - mapping.setup_names(); - F_And *f_root = mapping.add_and(); - for (int k = 1; k <= level-1; k++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.input_var(k), 1); - h.update_coef(mapping.output_var(k), -1); - } - for (int k = 0; k < privatized_levels.size(); k++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.input_var(privatized_levels[k]), 1); - h.update_coef(mapping.output_var(level+k), -1); - } - for (int k = 0; k < n_dim; k++) { - CG_outputRepr *repr = stmt_refs[i].second[j]->index(k); - exp2formula(ir, mapping, f_root, freevar, repr, mapping.output_var(level-1+privatized_levels.size()+k+1), 'w', IR_COND_EQ, false); - repr->clear(); - delete repr; - } - Relation r = Range(Restrict_Domain(mapping, Intersection(copy(stmt[stmt_num].IS), Extend_Set(copy(this->known), stmt[stmt_num].IS.n_set() - this->known.n_set())))); - if (stmt_refs[i].second[j]->is_write()) { - has_write_refs = true; - wo_copy_is = Union(wo_copy_is, r); - wo_copy_is.simplify(2, 4); - } - else { - has_read_refs = true; - //protonu--removing the next line for now - ro_copy_is = Union(ro_copy_is, r); - ro_copy_is.simplify(2, 4); - //ro_copy_is = ConvexRepresentation(Union(ro_copy_is, r)); - - } - } - } - - if (allow_extra_read) { - Relation t = DecoupledConvexHull(copy(ro_copy_is)); - if (t.number_of_conjuncts() > 1) - ro_copy_is = RectHull(ro_copy_is); - else - ro_copy_is = t; - } - else { - Relation t = ConvexRepresentation(copy(ro_copy_is)); - if (t.number_of_conjuncts() > 1) - ro_copy_is = RectHull(ro_copy_is); - else - ro_copy_is = t; - } - wo_copy_is = ConvexRepresentation(wo_copy_is); - - if (allow_extra_read) { - Tuple<Relation> Rs; - Tuple<int> active; - for (DNF_Iterator di(ro_copy_is.query_DNF()); di; di++) { - Rs.append(Relation(ro_copy_is, di.curr())); - active.append(1); - } - Relation the_gcs = Relation::True(ro_copy_is.n_set()); - for (int i = level-1+privatized_levels.size()+1; i <= level-1+privatized_levels.size()+n_dim; i++) { - Relation r = greatest_common_step(Rs, active, i, Relation::Null()); - the_gcs = Intersection(the_gcs, r); - } - - ro_copy_is = Approximate(ro_copy_is); - ro_copy_is = ConvexRepresentation(ro_copy_is); - ro_copy_is = Intersection(ro_copy_is, the_gcs); - ro_copy_is.simplify(); - } - for (int i = 1; i <= level-1+privatized_levels.size()+n_dim; i++) { - wo_copy_is.name_set_var(i, tmp_loop_var_name_prefix+to_string(i)); - ro_copy_is.name_set_var(i, tmp_loop_var_name_prefix+to_string(i)); - } - wo_copy_is.setup_names(); - ro_copy_is.setup_names(); - - // build merged iteration space for calculating temporary array size - bool already_use_recthull = false; - Relation untampered_copy_is = ConvexRepresentation(Union(copy(wo_copy_is), copy(ro_copy_is))); - Relation copy_is = untampered_copy_is; - if (copy_is.number_of_conjuncts() > 1) { - try { - copy_is = ConvexHull(copy(untampered_copy_is)); - } - catch (const std::overflow_error &e) { - copy_is = RectHull(copy(untampered_copy_is)); - already_use_recthull = true; - } - } - - -Retry_copy_is: - // extract temporary array information - CG_outputBuilder *ocg = ir->builder(); - std::vector<CG_outputRepr *> index_lb(n_dim); // initialized to NULL - std::vector<coef_t> index_stride(n_dim, 1); - std::vector<bool> is_index_eq(n_dim, false); - std::vector<std::pair<int, CG_outputRepr *> > index_sz(0); - Relation reduced_copy_is = copy(copy_is); - - for (int i = 0; i < n_dim; i++) { - if (i != 0) - reduced_copy_is = Project(reduced_copy_is, level-1+privatized_levels.size()+i, Set_Var); - Relation bound = get_loop_bound(reduced_copy_is, level-1+privatized_levels.size()+i); - - // extract stride - EQ_Handle stride_eq; - { - bool simple_stride = true; - int strides = countStrides(bound.query_DNF()->single_conjunct(), bound.set_var(level-1+privatized_levels.size()+i+1), stride_eq, simple_stride); - if (strides > 1) { - throw loop_error("too many strides"); - } - else if (strides == 1) { - int sign = stride_eq.get_coef(bound.set_var(level-1+privatized_levels.size()+i+1)); - Constr_Vars_Iter it(stride_eq, true); - index_stride[i] = abs((*it).coef/sign); - } - } - - // check if this arary index requires loop - Conjunct *c = bound.query_DNF()->single_conjunct(); - for (EQ_Iterator ei(c->EQs()); ei; ei++) { - if ((*ei).has_wildcards()) - continue; - - int coef = (*ei).get_coef(bound.set_var(level-1+privatized_levels.size()+i+1)); - if (coef != 0) { - int sign = 1; - if (coef < 0) { - coef = -coef; - sign = -1; - } - - CG_outputRepr *op = NULL; - for (Constr_Vars_Iter ci(*ei); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: - { - if ((*ci).var != bound.set_var(level-1+privatized_levels.size()+i+1)) - if ((*ci).coef*sign == 1) - op = ocg->CreateMinus(op, ocg->CreateIdent((*ci).var->name())); - else if ((*ci).coef*sign == -1) - op = ocg->CreatePlus(op, ocg->CreateIdent((*ci).var->name())); - else if ((*ci).coef*sign > 1) - op = ocg->CreateMinus(op, ocg->CreateTimes(ocg->CreateInt(abs((*ci).coef)), ocg->CreateIdent((*ci).var->name()))); - else // (*ci).coef*sign < -1 - op = ocg->CreatePlus(op, ocg->CreateTimes(ocg->CreateInt(abs((*ci).coef)), ocg->CreateIdent((*ci).var->name()))); - break; - } - case Global_Var: - { - Global_Var_ID g = (*ci).var->get_global_var(); - if ((*ci).coef*sign == 1) - op = ocg->CreateMinus(op, ocg->CreateIdent(g->base_name())); - else if ((*ci).coef*sign == -1) - op = ocg->CreatePlus(op, ocg->CreateIdent(g->base_name())); - else if ((*ci).coef*sign > 1) - op = ocg->CreateMinus(op, ocg->CreateTimes(ocg->CreateInt(abs((*ci).coef)), ocg->CreateIdent(g->base_name()))); - else // (*ci).coef*sign < -1 - op = ocg->CreatePlus(op, ocg->CreateTimes(ocg->CreateInt(abs((*ci).coef)), ocg->CreateIdent(g->base_name()))); - break; - } - default: - throw loop_error("unsupported array index expression"); - } - } - if ((*ei).get_const() != 0) - op = ocg->CreatePlus(op, ocg->CreateInt(-sign*((*ei).get_const()))); - if (coef != 1) - op = ocg->CreateIntegerDivide(op, ocg->CreateInt(coef)); - - index_lb[i] = op; - is_index_eq[i] = true; - break; - } - } - if (is_index_eq[i]) - continue; - - // seperate lower and upper bounds - std::vector<GEQ_Handle> lb_list, ub_list; - for (GEQ_Iterator gi(c->GEQs()); gi; gi++) { - int coef = (*gi).get_coef(bound.set_var(level-1+privatized_levels.size()+i+1)); - if (coef != 0 && (*gi).has_wildcards()) { - bool clean_bound = true; - GEQ_Handle h; - for (Constr_Vars_Iter cvi(*gi, true); gi; gi++) - if (!findFloorInequality(bound, (*cvi).var, h, bound.set_var(level-1+privatized_levels.size()+i+1))) { - clean_bound = false; - break; - } - if (!clean_bound) - continue; - } - - if (coef > 0) - lb_list.push_back(*gi); - else if (coef < 0) - ub_list.push_back(*gi); - } - if (lb_list.size() == 0 || ub_list.size() == 0) - if (already_use_recthull) - throw loop_error("failed to calcuate array footprint size"); - else { - copy_is = RectHull(copy(untampered_copy_is)); - already_use_recthull = true; - goto Retry_copy_is; - } - - // build lower bound representation - Tuple<CG_outputRepr *> lb_repr_list; - for (int j = 0; j < lb_list.size(); j++) - lb_repr_list.append(outputLBasRepr(ocg, lb_list[j], bound, - bound.set_var(level-1+privatized_levels.size()+i+1), - index_stride[i], stride_eq, Relation::True(bound.n_set()), - std::vector<CG_outputRepr *>(bound.n_set()))); - - if (lb_repr_list.size() > 1) - index_lb[i] = ocg->CreateInvoke("max", lb_repr_list); - else if (lb_repr_list.size() == 1) - index_lb[i] = lb_repr_list[1]; - - // build temporary array size representation - { - Relation cal(copy_is.n_set(), 1); - F_And *f_root = cal.add_and(); - for (int j = 0; j < ub_list.size(); j++) - for (int k = 0; k < lb_list.size(); k++) { - GEQ_Handle h = f_root->add_GEQ(); - - for (Constr_Vars_Iter ci(ub_list[j]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: - { - int pos = (*ci).var->get_position(); - h.update_coef(cal.input_var(pos), (*ci).coef); - break; - } - case Global_Var: - { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = cal.get_local(g); - else - v = cal.get_local(g, (*ci).var->function_of()); - h.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot calculate temporay array size statically"); - } - } - h.update_const(ub_list[j].get_const()); - - for (Constr_Vars_Iter ci(lb_list[k]); ci; ci++) { - switch ((*ci).var->kind()) { - case Input_Var: - { - int pos = (*ci).var->get_position(); - h.update_coef(cal.input_var(pos), (*ci).coef); - break; - } - case Global_Var: - { - Global_Var_ID g = (*ci).var->get_global_var(); - Variable_ID v; - if (g->arity() == 0) - v = cal.get_local(g); - else - v = cal.get_local(g, (*ci).var->function_of()); - h.update_coef(v, (*ci).coef); - break; - } - default: - throw loop_error("cannot calculate temporay array size statically"); - } - } - h.update_const(lb_list[k].get_const()); - - h.update_const(1); - h.update_coef(cal.output_var(1), -1); - } - - cal = Restrict_Domain(cal, copy(copy_is)); - for (int j = 1; j <= cal.n_inp(); j++) - cal = Project(cal, j, Input_Var); - cal.simplify(); - - // pad temporary array size - // TODO: for variable array size, create padding formula - Conjunct *c = cal.query_DNF()->single_conjunct(); - bool is_index_bound_const = false; - for (GEQ_Iterator gi(c->GEQs()); gi && !is_index_bound_const; gi++) - if ((*gi).is_const(cal.output_var(1))) { - coef_t size = (*gi).get_const() / (-(*gi).get_coef(cal.output_var(1))); - if (padding_stride != 0) { - size = (size + index_stride[i] - 1) / index_stride[i]; - if (i == fastest_changing_dimension) - size = size * padding_stride; - } - if (i == fastest_changing_dimension) { - if (padding_alignment > 1) { // align to boundary for data packing - int residue = size % padding_alignment; - if (residue) - size = size+padding_alignment-residue; - } - else if (padding_alignment < -1) { // un-alignment for memory bank conflicts - while (gcd(size, static_cast<coef_t>(-padding_alignment)) != 1) - size++; - } - } - index_sz.push_back(std::make_pair(i, ocg->CreateInt(size))); - is_index_bound_const = true; - } - - if (!is_index_bound_const) { - for (GEQ_Iterator gi(c->GEQs()); gi && !is_index_bound_const; gi++) { - int coef = (*gi).get_coef(cal.output_var(1)); - if (coef < 0) { - CG_outputRepr *op = NULL; - for (Constr_Vars_Iter ci(*gi); ci; ci++) { - if ((*ci).var != cal.output_var(1)) { - switch((*ci).var->kind()) { - case Global_Var: - { - Global_Var_ID g = (*ci).var->get_global_var(); - if ((*ci).coef == 1) - op = ocg->CreatePlus(op, ocg->CreateIdent(g->base_name())); - else if ((*ci).coef == -1) - op = ocg->CreateMinus(op, ocg->CreateIdent(g->base_name())); - else if ((*ci).coef > 1) - op = ocg->CreatePlus(op, ocg->CreateTimes(ocg->CreateInt((*ci).coef), ocg->CreateIdent(g->base_name()))); - else // (*ci).coef < -1 - op = ocg->CreateMinus(op, ocg->CreateTimes(ocg->CreateInt(-(*ci).coef), ocg->CreateIdent(g->base_name()))); - break; - } - default: - throw loop_error("failed to generate array index bound code"); - } - } - } - int c = (*gi).get_const(); - if (c > 0) - op = ocg->CreatePlus(op, ocg->CreateInt(c)); - else if (c < 0) - op = ocg->CreateMinus(op, ocg->CreateInt(-c)); - if (padding_stride != 0) { - if (i == fastest_changing_dimension) { - coef_t g = gcd(index_stride[i], static_cast<coef_t>(padding_stride)); - coef_t t1 = index_stride[i] / g; - if (t1 != 1) - op = ocg->CreateIntegerDivide(ocg->CreatePlus(op, ocg->CreateInt(t1-1)), ocg->CreateInt(t1)); - coef_t t2 = padding_stride / g; - if (t2 != 1) - op = ocg->CreateTimes(op, ocg->CreateInt(t2)); - } - else if (index_stride[i] != 1) { - op = ocg->CreateIntegerDivide(ocg->CreatePlus(op, ocg->CreateInt(index_stride[i]-1)), ocg->CreateInt(index_stride[i])); - } - } - - index_sz.push_back(std::make_pair(i, op)); - break; - } - } - } - } - } - - // change the temporary array index order - for (int i = 0; i < index_sz.size(); i++) - if (index_sz[i].first == fastest_changing_dimension) - switch (sym->layout_type()) { - case IR_ARRAY_LAYOUT_ROW_MAJOR: - std::swap(index_sz[index_sz.size()-1], index_sz[i]); - break; - case IR_ARRAY_LAYOUT_COLUMN_MAJOR: - std::swap(index_sz[0], index_sz[i]); - break; - default: - throw loop_error("unsupported array layout"); - } - - // declare temporary array or scalar - IR_Symbol *tmp_sym; - if (index_sz.size() == 0) { - tmp_sym = ir->CreateScalarSymbol(sym, memory_type); - } - else { - std::vector<CG_outputRepr *> tmp_array_size(index_sz.size()); - for (int i = 0; i < index_sz.size(); i++) - tmp_array_size[i] = index_sz[i].second->clone(); - tmp_sym = ir->CreateArraySymbol(sym, tmp_array_size, memory_type); - } - - // create temporary array read initialization code - CG_outputRepr *copy_code_read; - if (has_read_refs) - if (index_sz.size() == 0) { - IR_ScalarRef *tmp_scalar_ref = ir->CreateScalarRef(static_cast<IR_ScalarSymbol *>(tmp_sym)); - - std::vector<CG_outputRepr *> rhs_index(n_dim); - for (int i = 0; i < index_lb.size(); i++) - if (is_index_eq[i]) - rhs_index[i] = index_lb[i]->clone(); - else - rhs_index[i] = ir->builder()->CreateIdent(copy_is.set_var(level-1+privatized_levels.size()+i+1)->name()); - IR_ArrayRef *copied_array_ref = ir->CreateArrayRef(sym, rhs_index); - - copy_code_read = ir->builder()->CreateAssignment(0, tmp_scalar_ref->convert(), copied_array_ref->convert()); - } - else { - std::vector<CG_outputRepr *> lhs_index(index_sz.size()); - for (int i = 0; i < index_sz.size(); i++) { - int cur_index_num = index_sz[i].first; - CG_outputRepr *cur_index_repr = ocg->CreateMinus(ocg->CreateIdent(copy_is.set_var(level-1+privatized_levels.size()+cur_index_num+1)->name()), index_lb[cur_index_num]->clone()); - if (padding_stride != 0) { - if (i == n_dim-1) { - coef_t g = gcd(index_stride[cur_index_num], static_cast<coef_t>(padding_stride)); - coef_t t1 = index_stride[cur_index_num] / g; - if (t1 != 1) - cur_index_repr = ocg->CreateIntegerDivide(cur_index_repr, ocg->CreateInt(t1)); - coef_t t2 = padding_stride / g; - if (t2 != 1) - cur_index_repr = ocg->CreateTimes(cur_index_repr, ocg->CreateInt(t2)); - } - else if (index_stride[cur_index_num] != 1) { - cur_index_repr = ocg->CreateIntegerDivide(cur_index_repr, ocg->CreateInt(index_stride[cur_index_num])); - } - } - - if (ir->ArrayIndexStartAt() != 0) - cur_index_repr = ocg->CreatePlus(cur_index_repr, ocg->CreateInt(ir->ArrayIndexStartAt())); - lhs_index[i] = cur_index_repr; - } - - IR_ArrayRef *tmp_array_ref = ir->CreateArrayRef(static_cast<IR_ArraySymbol *>(tmp_sym), lhs_index); - - std::vector<CG_outputRepr *> rhs_index(n_dim); - for (int i = 0; i < index_lb.size(); i++) - if (is_index_eq[i]) - rhs_index[i] = index_lb[i]->clone(); - else - rhs_index[i] = ir->builder()->CreateIdent(copy_is.set_var(level-1+privatized_levels.size()+i+1)->name()); - IR_ArrayRef *copied_array_ref = ir->CreateArrayRef(sym, rhs_index); - - copy_code_read = ir->builder()->CreateAssignment(0, tmp_array_ref->convert(), copied_array_ref->convert()); - } - - // create temporary array write back code - CG_outputRepr *copy_code_write; - if (has_write_refs) - if (index_sz.size() == 0) { - IR_ScalarRef *tmp_scalar_ref = ir->CreateScalarRef(static_cast<IR_ScalarSymbol *>(tmp_sym)); - - std::vector<CG_outputRepr *> rhs_index(n_dim); - for (int i = 0; i < index_lb.size(); i++) - if (is_index_eq[i]) - rhs_index[i] = index_lb[i]->clone(); - else - rhs_index[i] = ir->builder()->CreateIdent(copy_is.set_var(level-1+privatized_levels.size()+i+1)->name()); - IR_ArrayRef *copied_array_ref = ir->CreateArrayRef(sym, rhs_index); - - copy_code_write = ir->builder()->CreateAssignment(0, copied_array_ref->convert(), tmp_scalar_ref->convert()); - } - else { - std::vector<CG_outputRepr *> lhs_index(n_dim); - for (int i = 0; i < index_lb.size(); i++) - if (is_index_eq[i]) - lhs_index[i] = index_lb[i]->clone(); - else - lhs_index[i] = ir->builder()->CreateIdent(copy_is.set_var(level-1+privatized_levels.size()+i+1)->name()); - IR_ArrayRef *copied_array_ref = ir->CreateArrayRef(sym, lhs_index); - - std::vector<CG_outputRepr *> rhs_index(index_sz.size()); - for (int i = 0; i < index_sz.size(); i++) { - int cur_index_num = index_sz[i].first; - CG_outputRepr *cur_index_repr = ocg->CreateMinus(ocg->CreateIdent(copy_is.set_var(level-1+privatized_levels.size()+cur_index_num+1)->name()), index_lb[cur_index_num]->clone()); - if (padding_stride != 0) { - if (i == n_dim-1) { - coef_t g = gcd(index_stride[cur_index_num], static_cast<coef_t>(padding_stride)); - coef_t t1 = index_stride[cur_index_num] / g; - if (t1 != 1) - cur_index_repr = ocg->CreateIntegerDivide(cur_index_repr, ocg->CreateInt(t1)); - coef_t t2 = padding_stride / g; - if (t2 != 1) - cur_index_repr = ocg->CreateTimes(cur_index_repr, ocg->CreateInt(t2)); - } - else if (index_stride[cur_index_num] != 1) { - cur_index_repr = ocg->CreateIntegerDivide(cur_index_repr, ocg->CreateInt(index_stride[cur_index_num])); - } - } - - if (ir->ArrayIndexStartAt() != 0) - cur_index_repr = ocg->CreatePlus(cur_index_repr, ocg->CreateInt(ir->ArrayIndexStartAt())); - rhs_index[i] = cur_index_repr; - } - IR_ArrayRef *tmp_array_ref = ir->CreateArrayRef(static_cast<IR_ArraySymbol *>(tmp_sym), rhs_index); - - copy_code_write = ir->builder()->CreateAssignment(0, copied_array_ref->convert(), tmp_array_ref->convert()); - } - - // now we can remove those loops for array indexes that are - // dependent on others - if (!(index_sz.size() == n_dim && (sym->layout_type() == IR_ARRAY_LAYOUT_ROW_MAJOR || n_dim <= 1))) { - Relation mapping(level-1+privatized_levels.size()+n_dim, level-1+privatized_levels.size()+index_sz.size()); - F_And *f_root = mapping.add_and(); - for (int i = 1; i <= level-1+privatized_levels.size(); i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.input_var(i), 1); - h.update_coef(mapping.output_var(i), -1); - } - - int cur_index = 0; - std::vector<int> mapped_index(index_sz.size()); - for (int i = 0; i < n_dim; i++) - if (!is_index_eq[i]) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(mapping.input_var(level-1+privatized_levels.size()+i+1), 1); - switch (sym->layout_type()) { - case IR_ARRAY_LAYOUT_COLUMN_MAJOR: { - h.update_coef(mapping.output_var(level-1+privatized_levels.size()+index_sz.size()-cur_index), -1); - mapped_index[index_sz.size()-cur_index-1] = i; - break; - } - case IR_ARRAY_LAYOUT_ROW_MAJOR: { - h.update_coef(mapping.output_var(level-1+privatized_levels.size()+cur_index+1), -1); - mapped_index[cur_index] = i; - break; - } - default: - throw loop_error("unsupported array layout"); - } - cur_index++; - } - - wo_copy_is = Range(Restrict_Domain(copy(mapping), wo_copy_is)); - ro_copy_is = Range(Restrict_Domain(copy(mapping), ro_copy_is)); - for (int i = 1; i <= level-1+privatized_levels.size(); i++) { - wo_copy_is.name_set_var(i, copy_is.set_var(i)->name()); - ro_copy_is.name_set_var(i, copy_is.set_var(i)->name()); - } - for (int i = 0; i < index_sz.size(); i++) { - wo_copy_is.name_set_var(level-1+privatized_levels.size()+i+1, copy_is.set_var(level-1+privatized_levels.size()+mapped_index[i]+1)->name()); - ro_copy_is.name_set_var(level-1+privatized_levels.size()+i+1, copy_is.set_var(level-1+privatized_levels.size()+mapped_index[i]+1)->name()); - } - wo_copy_is.setup_names(); - ro_copy_is.setup_names(); - } - - // insert read copy statement - int old_num_stmt = stmt.size(); - int ro_copy_stmt_num = -1; - if (has_read_refs) { - Relation copy_xform(ro_copy_is.n_set(), 2*ro_copy_is.n_set()+1); - { - F_And *f_root = copy_xform.add_and(); - for (int i = 1; i <= ro_copy_is.n_set(); i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(copy_xform.input_var(i), 1); - h.update_coef(copy_xform.output_var(2*i), -1); - } - for (int i = 1; i <= dim; i+=2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(copy_xform.output_var(i), -1); - h.update_const(lex[i-1]); - } - for (int i = dim+2; i <= copy_xform.n_out(); i+=2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(copy_xform.output_var(i), 1); - } - } - - Statement copy_stmt_read; - copy_stmt_read.IS = ro_copy_is; - copy_stmt_read.xform = copy_xform; - copy_stmt_read.code = copy_code_read; - copy_stmt_read.loop_level = std::vector<LoopLevel>(ro_copy_is.n_set()); - for (int i = 0; i < level-1; i++) { - copy_stmt_read.loop_level[i].type = stmt[*(active.begin())].loop_level[i].type; - if (stmt[*(active.begin())].loop_level[i].type == LoopLevelTile && - stmt[*(active.begin())].loop_level[i].payload >= level) { - int j; - for (j = 0; j < privatized_levels.size(); j++) - if (privatized_levels[j] == stmt[*(active.begin())].loop_level[i].payload) - break; - if (j == privatized_levels.size()) - copy_stmt_read.loop_level[i].payload = -1; - else - copy_stmt_read.loop_level[i].payload = level + j; - } - else - copy_stmt_read.loop_level[i].payload = stmt[*(active.begin())].loop_level[i].payload; - copy_stmt_read.loop_level[i].parallel_level = stmt[*(active.begin())].loop_level[i].parallel_level; - } - for (int i = 0; i < privatized_levels.size(); i++) { - copy_stmt_read.loop_level[level-1+i].type = stmt[*(active.begin())].loop_level[privatized_levels[i]].type; - copy_stmt_read.loop_level[level-1+i].payload = stmt[*(active.begin())].loop_level[privatized_levels[i]].payload; - copy_stmt_read.loop_level[level-1+i].parallel_level = stmt[*(active.begin())].loop_level[privatized_levels[i]].parallel_level; - } - int left_num_dim = num_dep_dim - (get_last_dep_dim_before(*(active.begin()), level) + 1); - for (int i = 0; i < min(left_num_dim, static_cast<int>(index_sz.size())); i++) { - copy_stmt_read.loop_level[level-1+privatized_levels.size()+i].type = LoopLevelOriginal; - copy_stmt_read.loop_level[level-1+privatized_levels.size()+i].payload = num_dep_dim-left_num_dim+i; - copy_stmt_read.loop_level[level-1+privatized_levels.size()+i].parallel_level = 0; - } - for (int i = min(left_num_dim, static_cast<int>(index_sz.size())); i < index_sz.size(); i++) { - copy_stmt_read.loop_level[level-1+privatized_levels.size()+i].type = LoopLevelUnknown; - copy_stmt_read.loop_level[level-1+privatized_levels.size()+i].payload = -1; - copy_stmt_read.loop_level[level-1+privatized_levels.size()+i].parallel_level = 0; - } - - shiftLexicalOrder(lex, dim-1, 1); - stmt.push_back(copy_stmt_read); - ro_copy_stmt_num = stmt.size() - 1; - dep.insert(); - } - - // insert write copy statement - int wo_copy_stmt_num = -1; - if (has_write_refs) { - Relation copy_xform(wo_copy_is.n_set(), 2*wo_copy_is.n_set()+1); - { - F_And *f_root = copy_xform.add_and(); - for (int i = 1; i <= wo_copy_is.n_set(); i++) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(copy_xform.input_var(i), 1); - h.update_coef(copy_xform.output_var(2*i), -1); - } - for (int i = 1; i <= dim; i+=2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(copy_xform.output_var(i), -1); - h.update_const(lex[i-1]); - } - for (int i = dim+2; i <= copy_xform.n_out(); i+=2) { - EQ_Handle h = f_root->add_EQ(); - h.update_coef(copy_xform.output_var(i), 1); - } - } - - Statement copy_stmt_write; - copy_stmt_write.IS = wo_copy_is; - copy_stmt_write.xform = copy_xform; - copy_stmt_write.code = copy_code_write; - copy_stmt_write.loop_level = std::vector<LoopLevel>(wo_copy_is.n_set()); - for (int i = 0; i < level-1; i++) { - copy_stmt_write.loop_level[i].type = stmt[*(active.begin())].loop_level[i].type; - if (stmt[*(active.begin())].loop_level[i].type == LoopLevelTile && - stmt[*(active.begin())].loop_level[i].payload >= level) { - int j; - for (j = 0; j < privatized_levels.size(); j++) - if (privatized_levels[j] == stmt[*(active.begin())].loop_level[i].payload) - break; - if (j == privatized_levels.size()) - copy_stmt_write.loop_level[i].payload = -1; - else - copy_stmt_write.loop_level[i].payload = level + j; - } - else - copy_stmt_write.loop_level[i].payload = stmt[*(active.begin())].loop_level[i].payload; - copy_stmt_write.loop_level[i].parallel_level = stmt[*(active.begin())].loop_level[i].parallel_level; - } - for (int i = 0; i < privatized_levels.size(); i++) { - copy_stmt_write.loop_level[level-1+i].type = stmt[*(active.begin())].loop_level[privatized_levels[i]].type; - copy_stmt_write.loop_level[level-1+i].payload = stmt[*(active.begin())].loop_level[privatized_levels[i]].payload; - copy_stmt_write.loop_level[level-1+i].parallel_level = stmt[*(active.begin())].loop_level[privatized_levels[i]].parallel_level; - } - int left_num_dim = num_dep_dim - (get_last_dep_dim_before(*(active.begin()), level) + 1); - for (int i = 0; i < min(left_num_dim, static_cast<int>(index_sz.size())); i++) { - copy_stmt_write.loop_level[level-1+privatized_levels.size()+i].type = LoopLevelOriginal; - copy_stmt_write.loop_level[level-1+privatized_levels.size()+i].payload = num_dep_dim-left_num_dim+i; - copy_stmt_write.loop_level[level-1+privatized_levels.size()+i].parallel_level = 0; - } - for (int i = min(left_num_dim, static_cast<int>(index_sz.size())); i < index_sz.size(); i++) { - copy_stmt_write.loop_level[level-1+privatized_levels.size()+i].type = LoopLevelUnknown; - copy_stmt_write.loop_level[level-1+privatized_levels.size()+i].payload = -1; - copy_stmt_write.loop_level[level-1+privatized_levels.size()+i].parallel_level = 0; - } - - lex[dim-1]++; - shiftLexicalOrder(lex, dim-1, -2); - stmt.push_back(copy_stmt_write); - wo_copy_stmt_num = stmt.size() - 1; - dep.insert(); - } - - // replace original array accesses with temporary array accesses - for (int i =0; i < stmt_refs.size(); i++) - for (int j = 0; j < stmt_refs[i].second.size(); j++) { - if (index_sz.size() == 0) { - IR_ScalarRef *tmp_scalar_ref = ir->CreateScalarRef(static_cast<IR_ScalarSymbol *>(tmp_sym)); - ir->ReplaceExpression(stmt_refs[i].second[j], tmp_scalar_ref->convert()); - } - else { - std::vector<CG_outputRepr *> index_repr(index_sz.size()); - for (int k = 0; k < index_sz.size(); k++) { - int cur_index_num = index_sz[k].first; - - CG_outputRepr *cur_index_repr = ocg->CreateMinus(stmt_refs[i].second[j]->index(cur_index_num), index_lb[cur_index_num]->clone()); - if (padding_stride != 0) { - if (k == n_dim-1) { - coef_t g = gcd(index_stride[cur_index_num], static_cast<coef_t>(padding_stride)); - coef_t t1 = index_stride[cur_index_num] / g; - if (t1 != 1) - cur_index_repr = ocg->CreateIntegerDivide(cur_index_repr, ocg->CreateInt(t1)); - coef_t t2 = padding_stride / g; - if (t2 != 1) - cur_index_repr = ocg->CreateTimes(cur_index_repr, ocg->CreateInt(t2)); - } - else if (index_stride[cur_index_num] != 1) { - cur_index_repr = ocg->CreateIntegerDivide(cur_index_repr, ocg->CreateInt(index_stride[cur_index_num])); - } - } - - if (ir->ArrayIndexStartAt() != 0) - cur_index_repr = ocg->CreatePlus(cur_index_repr, ocg->CreateInt(ir->ArrayIndexStartAt())); - index_repr[k] = cur_index_repr; - } - - IR_ArrayRef *tmp_array_ref = ir->CreateArrayRef(static_cast<IR_ArraySymbol *>(tmp_sym), index_repr); - ir->ReplaceExpression(stmt_refs[i].second[j], tmp_array_ref->convert()); - } - } - - // update dependence graph - int dep_dim = get_last_dep_dim_before(*(active.begin()), level) + 1; - if (ro_copy_stmt_num != -1) { - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::vector<DependenceVector> > D; - - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end();) { - if (active.find(i) != active.end() && active.find(j->first) == active.end()) { - std::vector<DependenceVector> dvs1, dvs2; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.sym != NULL && dv.sym->name() == sym->name() && (dv.type == DEP_R2R || dv.type == DEP_R2W)) - dvs1.push_back(dv); - else - dvs2.push_back(dv); - } - j->second = dvs2; - if (dvs1.size() > 0) - dep.connect(ro_copy_stmt_num, j->first, dvs1); - } - else if (active.find(i) == active.end() && active.find(j->first) != active.end()) { - std::vector<DependenceVector> dvs1, dvs2; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.sym != NULL && dv.sym->name() == sym->name() && (dv.type == DEP_R2R || dv.type == DEP_W2R)) - dvs1.push_back(dv); - else - dvs2.push_back(dv); - } - j->second = dvs2; - if (dvs1.size() > 0) - D.push_back(dvs1); - } - - if (j->second.size() == 0) - dep.vertex[i].second.erase(j++); - else - j++; - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, ro_copy_stmt_num, D[j]); - } - - // insert dependences from copy statement loop to copied statements - DependenceVector dv; - dv.type = DEP_W2R; - dv.sym = tmp_sym->clone(); - dv.lbounds = std::vector<coef_t>(num_dep_dim, 0); - dv.ubounds = std::vector<coef_t>(num_dep_dim, 0); - for (int i = dep_dim; i < num_dep_dim; i++) { - dv.lbounds[i] = -posInfinity; - dv.ubounds[i] = posInfinity; - } - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) - dep.connect(ro_copy_stmt_num, *i, dv); - } - - if (wo_copy_stmt_num != -1) { - for (int i = 0; i < old_num_stmt; i++) { - std::vector<std::vector<DependenceVector> > D; - - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end();) { - if (active.find(i) != active.end() && active.find(j->first) == active.end()) { - std::vector<DependenceVector> dvs1, dvs2; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.sym != NULL && dv.sym->name() == sym->name() && (dv.type == DEP_W2R || dv.type == DEP_W2W)) - dvs1.push_back(dv); - else - dvs2.push_back(dv); - } - j->second = dvs2; - if (dvs1.size() > 0) - dep.connect(wo_copy_stmt_num, j->first, dvs1); - } - else if (active.find(i) == active.end() && active.find(j->first) != active.end()) { - std::vector<DependenceVector> dvs1, dvs2; - for (int k = 0; k < j->second.size(); k++) { - DependenceVector dv = j->second[k]; - if (dv.sym != NULL && dv.sym->name() == sym->name() && (dv.type == DEP_R2W || dv.type == DEP_W2W)) - dvs1.push_back(dv); - else - dvs2.push_back(dv); - } - j->second = dvs2; - if (dvs1.size() > 0) - D.push_back(dvs1); - } - - if (j->second.size() == 0) - dep.vertex[i].second.erase(j++); - else - j++; - } - - for (int j = 0; j < D.size(); j++) - dep.connect(i, wo_copy_stmt_num, D[j]); - } - - // insert dependences from copied statements to write statements - DependenceVector dv; - dv.type = DEP_W2R; - dv.sym = tmp_sym->clone(); - dv.lbounds = std::vector<coef_t>(num_dep_dim, 0); - dv.ubounds = std::vector<coef_t>(num_dep_dim, 0); - for (int i = dep_dim; i < num_dep_dim; i++) { - dv.lbounds[i] = -posInfinity; - dv.ubounds[i] = posInfinity; - } - for (std::set<int>::iterator i = active.begin(); i != active.end(); i++) - dep.connect(*i, wo_copy_stmt_num, dv); - - } - - // update variable name for dependences among copied statements - for (int i = 0; i < old_num_stmt; i++) { - if (active.find(i) != active.end()) - for (DependenceGraph::EdgeList::iterator j = dep.vertex[i].second.begin(); j != dep.vertex[i].second.end(); j++) - if (active.find(j->first) != active.end()) - for (int k = 0; k < j->second.size(); k++) { - IR_Symbol *s = tmp_sym->clone(); - j->second[k].sym = s; - } - } - - // insert anti-dependence from write statement to read statement - if (ro_copy_stmt_num != -1 && wo_copy_stmt_num != -1) - if (dep_dim >= 0) { - DependenceVector dv; - dv.type = DEP_R2W; - dv.sym = tmp_sym->clone(); - dv.lbounds = std::vector<coef_t>(num_dep_dim, 0); - dv.ubounds = std::vector<coef_t>(num_dep_dim, 0); - for (int k = dep_dim; k < num_dep_dim; k++) { - dv.lbounds[k] = -posInfinity; - dv.ubounds[k] = posInfinity; - } - for (int k = 0; k < dep_dim; k++) { - if (k != 0) { - dv.lbounds[k-1] = 0; - dv.ubounds[k-1] = 0; - } - dv.lbounds[k] = 1; - dv.ubounds[k] = posInfinity; - dep.connect(wo_copy_stmt_num, ro_copy_stmt_num, dv); - } - } - - - // cleanup - delete sym; - delete tmp_sym; - for (int i = 0; i < index_lb.size(); i++) { - index_lb[i]->clear(); - delete index_lb[i]; - } - for (int i = 0; i < index_sz.size(); i++) { - index_sz[i].second->clear(); - delete index_sz[i].second; - } - - return true; -} diff --git a/test-chill/Makefile b/test-chill/Makefile deleted file mode 100644 index d7238e8..0000000 --- a/test-chill/Makefile +++ /dev/null @@ -1,210 +0,0 @@ -### ### -### SVN variables ### -### ### -SVN_USER=dhuth - -### ### -### Notification ### -### (not implemented yet) ### -NOTIFY_ON_FAILURE=False - - - -### Derived variables from config ### -CHILLHOME?=$(STAGING_DIR)/chill -SVN_CHILL=svn+ssh://$(SVN_USER)@shell.cs.utah.edu/uusoc/facility/res/hallresearch/svn_repo/resRepo/projects/chill -SVN_CHILL_DEV=$(SVN_CHILL)/branches/cuda-chill-rose -SVN_CHILL_RELEASE=$(SVN_CHILL)/release -CHILL_DEV_SRC=$(STAGING_DIR)/chill-dev -CHILL_RELEASE_SRC=$(STAGING_DIR)/chill-release -OMEGAHOME?=$(STAGING_DIR)/omega -SVN_OMEGA=svn+ssh://$(SVN_USER)@shell.cs.utah.edu/uusoc/facility/res/hallresearch/svn_repo/resRepo/projects/omega -SVN_OMEGA_DEV=$(SVN_OMEGA)/branches/cuda-omega-rose -SVN_OMEGA_RELEASE=$(SVN_OMEGA)/release -OMEGA_DEV_SRC=$(STAGING_DIR)/omega-dev -OMEGA_RELEASE_SRC=$(STAGING_DIR)/omega-release - - -### Staging ### -STAGING_DIR=$(shell pwd)/.staging -STAGING_DIR_BIN=$(STAGING_DIR)/bin -STAGING_DIR_WD=$(STAGING_DIR)/wd - - -### Local ### -UNIT_TEST_DIR=$(shell pwd)/unit-tests/ -CHILL_DEV_TESTCASE_DIR=$(shell pwd)/test-cases/chill -CHILL_DEV_TESTCASES_SCRIPT=$(shell find $(CHILL_DEV_TESTCASE_DIR) -name "*.script") -CHILL_DEV_TESTCASES_STDOUT=$(patsubst %.script,%.stdout,$(CHILL_DEV_TESTCASES_SCRIPT)) - -### Python environment variables ### -PYTHON_2:=$(shell which python) -PYTHON_3:=$(shell which python3) - -ifneq ($(PYTHON_3),) -PYTHON_3_VERSION=$(shell $(PYTHON_3) -c "import sysconfig; print(sysconfig.get_config_var('VERSION'))") -endif -PYTHON_2_VERSION=$(shell $(PYTHON_2) -c "import sysconfig; print sysconfig.get_config_var('VERSION')") -PYTHON_VERSION=$(firstword $(PYTHON_3_VERSION) $(PYTHON_2_VERSION)) -PYTHON=$(shell which python$(PYTHON_VERSION)) -### ---------------------------- ### - - -EXPORT=export CHILL_DEV_SRC=$(CHILL_DEV_SRC); \ - export CHILL_RELEASE_SRC=$(CHILL_RELEASE_SRC); \ - export OMEGA_DEV_SRC=$(OMEGA_DEV_SRC); \ - export OMEGA_RELEASE_SRC=$(OMEGA_RELEASE_SRC); \ - export STAGING_DIR_BIN=$(STAGING_DIR_BIN); \ - export STAGING_DIR_WD=$(STAGING_DIR_WD); - -### deump environment ### -# define quiet to shut this part up # -ifndef quiet -$(info notify on failure? $(NOTIFY_ON_FAILURE)) -$(info staging directory $(STAGING_DIR)) -$(info binary directory $(STAGING_DIR_BIN)) -$(info working directory $(STAGING_DIR_WD)) -$(info omega home $(OMEGAHOME)) -$(info chill home $(CHILLHOME)) -$(info chill svn dev repo $(SVN_CHILL_DEV)) -$(info chill svn release repo $(SVN_CHILL_RELEASE)) -$(info chill dev src $(CHILL_DEV_SRC)) -$(info chill release src $(CHILL_RELEASE_SRC)) -$(info omega svn dev repo $(SVN_OMEGA_DEV)) -$(info omega svn release repo $(SVN_OMEGA_RELEASE)) -$(info omega dev src $(OMEGA_DEV_SRC)) -$(info omega release src $(OMEGA_RELEASE_SRC)) -$(info python $(PYTHON)) -$(info unit tests $(UNIT_TEST_DIR)) -#$(info chill-dev test cases $(CHILL_DEV_TESTCASES_SCRIPT)) -#$(info chill-dev test case stdouts $(CHILL_DEV_TESTCASES_STDOUT)) -endif -### ----------------- ### - -DIRTY_EXTS=pyc o log pickle -DIRTY_FILES=$(foreach de,$(DIRTY_EXTS),$(shell find . -name "*.$(de)")) -DIRTY_DIRS=$(shell find . -name '__pycache__' -and -type d) $(STAGING_DIR) pylang coverage_report - -CORE_TESTS:=_extract util gcov _cpp_validate_env cpp_validate test __main__ -OMEGA_TESTS:=omega -CHILL_TESTS:=chill - -CORE_TESTS:=$(addsuffix .py,$(addprefix unit-tests/test_,$(CORE_TESTS))) -OMEGA_TESTS:=$(addsuffix .py,$(addprefix unit-tests/test_,$(OMEGA_TESTS))) -CHILL_TESTS:=$(addsuffix .py,$(addprefix unit-tests/test_,$(CHILL_TESTS))) - -### The all target ### -.PHONY: all -all: - $(MAKE) clean quiet=1 - $(MAKE) install quiet=1 - - -### This will install the chill_test module ### -.PHONY: install -install: pylang - $(PYTHON) makeparser.py - #TODO: maybe run a setup or something - - - -### This will uninstall teh chill_test module ### -.PHONY: uninstall -uninstall: - #TODO: can python modules be uninstalled? - - - -### Simply removes all files listed in DIRTY_FILES ### -.PHONY: clean -clean: - rm -rf $(DIRTY_FILES) - rm -rf $(DIRTY_DIRS) - - -pylang: - git clone https://github.com/dhuth/pylang.git pylang-tmp - $(PYTHON) pylang-tmp/make_grammar_parsers.py - cp -r pylang-tmp/pylang pylang - rm -rf pylang-tmp - -### Test the test harness ### -.PHONY: test -test: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC) $(CHILL_DEV_SRC) $(CHILL_RELEASE_SRC) - @echo "-----------------------------------------------------------" - @echo "Note: This target tests the test suite it's self, not chill" - @echo "To test chill, run python -m testchill ..." - @echo "-----------------------------------------------------------" - - $(EXPORT) $(PYTHON) -m unittest $(OMEGA_TESTS) $(CORE_TESTS) $(CHILL_TESTS) - @ rm -rf $(STAGING_DIR) - - -.PHONY: test-chill -test-chill: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC) $(CHILL_DEV_SRC) $(CHILL_RELEASE_SRC) - - $(EXPORT) $(PYTHON) -m unittest $(OMEGA_TESTS) $(CHILL_TESTS) - @ rm -rf $(STAGING_DIR) - - -.PHONY: test-omega -test-omega: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC) - - $(EXPORT) $(PYTHON) -m unittest $(OMEGA_TESTS) - @ rm -rf $(STAGING_DIR) - - -.PHONY: test-core -test-core: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC) $(CHILL_DEV_SRC) $(CHILL_RELEASE_SRC) make-omega - - $(EXPORT) $(PYTHON) -m unittest $(CORE_TESTS) - @ rm -rf $(STAGING_DIR) - - -.PHONY: -test-core-%: $(STAGING_DIR_BIN) - - $(EXPORT) $(PYTHON) -m unittest unit-tests/test_$*.py - - -.PHONY: test-debug -debug: - @### NOTHING ### - - -### benchmarking (don't use if your're not me) ### -$(CHILL_DEV_TESTCASES_STDOUT): %.stdout: %.script - $(EXPORT) cd $(STAGING_DIR_WD); $(STAGING_DIR_BIN)/chill $< > $@ - - -.PHONY: benchmark-dev -benchmark-dev: test-chill $(CHILL_DEV_TESTCASES_STDOUT) - # do nothing - - -### checking out and making directories ### -$(STAGING_DIR_BIN): - mkdir -p $(STAGING_DIR_BIN) - mkdir -p $(STAGING_DIR_WD) - -$(CHILL_DEV_SRC): $(OMEGA_DEV_SRC) $(STAGING_DIR_BIN) - svn export $(SVN_CHILL_DEV) $(CHILL_DEV_SRC) - -$(CHILL_RELEASE_SRC): $(OMEGA_RELEASE_SRC) $(STAGIN_DIR_BIN) - svn export $(SVN_CHILL_RELEASE) $(CHILL_RELEASE_SRC) - -$(OMEGA_DEV_SRC): $(STAGING_DIR_BIN) - svn export $(SVN_OMEGA_DEV) $(OMEGA_DEV_SRC) - #cd $(OMEGA_DEV_SRC); $(MAKE) depend - #cd $(OMEGA_DEV_SRC); $(MAKE) - -$(OMEGA_RELEASE_SRC): $(STAGING_DIR_BIN) - svn export $(SVN_OMEGA_RELEASE) $(OMEGA_RELEASE_SRC) - #cd $(OMEGA_RELEASE_SRC); $(MAKE) depend - #cd $(OMEGA_RELEASE_SRC): $(MAKE) - -.PHONY: make-omega -make-omega: - cd $(OMEGA_DEV_SRC); $(MAKE) depend - cd $(OMEGA_DEV_SRC); $(MAKE) - cd $(OMEGA_RELEASE_SRC); $(MAKE) depend - cd $(OMEGA_RELEASE_SRC); $(MAKE) - -#$(STAGING_DIR): -# mkdir -p $(STAGING_DIR) - diff --git a/test-chill/README.md b/test-chill/README.md deleted file mode 100644 index e35ff68..0000000 --- a/test-chill/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# testchill - -## Description -TODO: better description -testchill is a Python module that runs a series of tests to aid in the development and maintence of CHiLL. -testchill tests that chill compiles successfully, that scripts can be run without error, and that they generate compilable code. -It can also optionally test optimized code for correctness and provide code coverage. - - -## Running testchill - -testchill is a Python module, and can be run like any other Python module: -`python -m testchill <suite-args>* <sub-command> <sub-command-args>*` - -The most basic subcommand that runs the testsuite is [`local`](#-local-chill-home-). `local` runs a set of tests -on the parent chill source directory. - -`python -m testchill [-O <path-to-omega>] local [-C <path-to-chill>]` If the environment variable $OMEGAHOME is set, the `-O` argument can be ommited. - -### Arguments common to all sub commands (with the exception of `local`): -- `-w <working-directory>, --working-dir <working-directory>` - - Sets the working directory where testchill will compile and run test scripts. If not set, the current working directory will be used. - -- `-R <rose-home>, --rose-home <rose-home>` - - Set ROSEHOME environment variable for building omega. If not set, the current ROSEHOME environment variable will be used. - -- `-C <chill directory>, --chill-home <chill-home>` - - Set the path to chill. If not set, the current CHILLHOME environment variable will be used. - -- `-O <omega directory>, --omega-home <omega-home>` - - Set the path to omega. If not set, the current OMEGAHOME environment variable will be used. - -- `-b <binary directory>, --binary-dir <binary directory>` - - Set the directory were all chill binary files will be placed after being compiled. The chill directory will be used by default. - -### Subcommands for running individual tests: -- <h4> `build-chill-testcase ...` - - Build chill. It will fail if the build process returns non zero. - Optional arguments: - - `-v {release | dev}` or `--chill-branch {release | dev}` - - `release` will build the old release version, and `dev` will build the current development version. - `dev` is used by default. - - - `-u | -c` or `--target-cuda | --target-c` - - `-c` will build chill, and `-u` will build cuda-chill. - `-c` is used by default. - - - `-i {script | lua | python}` or `--interface-lang {script | lua | python}` - - Set the interface language chill will be build for. - `script` will build chill with the original chill script language. - `lua` will build chill with lua as the interface language. - `python` will build chill with python as the interface language. - By default, `script` is used for chill and `lua` is used for cuda-chill. - - - `--build-coverage | --no-build-coverage` - - `--build-coverage` will build chill to work with gcov. - `--no-build-coverage` will build chill normally. - It is on by default. - -- <h4> `chill-testcase <chill-script> <chill-src> ...` - - Run a chill test script. - Arguments: - - `chill-script` - - Path to the script file. - - - `chill-src` - - Path to the source file. - - Optional arguments: - - `-v {release | dev}` or `--chill-branch {release | dev}` - - `release` will run scripts as the old release version, and `dev` will run them as the current development version. - `dev` is used by default. - - - `-u | -c` or `--target-cuda | --target-c` - - `-c` will run chill, and `-u` will run cuda-chill. - `-c` is used by default. - - - `-i {script | lua | python}` or `--interface-lang {script | lua | python}` - - Set the interface language chill will be run with. - `script` will run chill with the original chill script language. - `lua` will run chill with lua as the interface language. - `python` will run chill with python as the interface language. - By default, `script` is used for chill and `lua` is used for cuda-chill. - - - `--compile-src | --no-compile-src` - - Turns source compilation test on or off. If on, the source file will be compiled prior to transormation. - On by default. - - - `--run-script | --no-run-script` - - If on, the script file will be run. - On by default. - - - `--compile-gensrc | --no-compile-gensrc` - - If on, the generated source file will be compiled. - On by default. - - - `--check-run-script | --no-check-run-script` - - If on, the generated object file will be run. If there are any validation tests, each one will be compiled and run. - On by default. - - - `--test-coverage | --no-test-coverage` - - If on, coverage data will be compiled during the run-script test. - On by default. - -- <h4> `batch <batch-file>` - - Run a test case list (*.tclist) file. Each line constists of a subcommand to be passed to testchill (including additional `batch` commands). - Arguments: - - `<batch-file>` - - Path to a test case list file. - -- <h4> `local <chill-home> ...` - - Compile and test a local chill source directory. - Arguments: - - `<chill-home>` - - Path to chill. - - Optional arguments: - - `-v {release | dev}` or `--chill-branch {release | dev}` - - `release` will run scripts as the old release version, and `dev` will run them as the current development version. - `dev` is used by default. - - - diff --git a/test-chill/coverage.py b/test-chill/coverage.py deleted file mode 100644 index 8ff5af8..0000000 --- a/test-chill/coverage.py +++ /dev/null @@ -1,64 +0,0 @@ -import argparse -import pickle - - -def loadcov(filename = 'coverage.pickle'): - with open(filename) as f: - return pickle.load(f) - - -def lines(covset, filename): - for line in covset.coverage_by_file[filename].lines: - yield line.lineno, line.count(), line.code - - -def nonexecuted(covset, filename): - return filter(lambda line: line[1] == 0, lines(covset, filename)) - - -def commented(covset, filename): - return filter(lambda line: line[1] is None, lines(covset, filename)) - - -def linerange(lineiter, minline, maxline): - return filter(lambda line: line[0] >= minline and line[0] <= maxline, lineiter) - - -def print_nonexec(argsns, cov): - if argsns.filename is None: - covlist = list((k, len(list(nonexecuted(cov, k)))) for k in cov.filenames) - covlist = sorted(covlist, key=lambda i: i[1]) - for i in reversed(range(len(covlist))): - print('{}: {}'.format(covlist[i][0].ljust(24), covlist[i][1])) - else: - minline, maxline = map(int,argsns.linerange) - for lineno, count, code in linerange(nonexecuted(cov, argsns.filename), minline, maxline): - print('{}: {}'.format(str(lineno).rjust(5), code)) - - -def print_full_nonexec(argsns, cov): - for filename in cov.filenames: - with open('coverage_report/' + filename + '.txt', 'w') as f: - minline, maxline = map(int,argsns.linerange) - for lineno, count, code in linerange(nonexecuted(cov, filename), minline, maxline): - f.write('{}: {}\n'.format(str(lineno).rjust(5),code)) - - -def make_argparser(): - arg_parser = argparse.ArgumentParser('coverage.py') - cmd_parser_set = arg_parser.add_subparsers() - nonexec_cmd = cmd_parser_set.add_parser('nonexec') - nonexec_cmd.add_argument('-f', dest='filename', default=None) - nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE') - nonexec_cmd.set_defaults(func=print_nonexec) - full_nonexec_cmd = cmd_parser_set.add_parser('full_nonexec') - full_nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE') - full_nonexec_cmd.set_defaults(func=print_full_nonexec) - return arg_parser - - -if __name__ == '__main__': - argsns = make_argparser().parse_args() - cov = loadcov() - argsns.func(argsns, cov) - diff --git a/test-chill/makeparser.py b/test-chill/makeparser.py deleted file mode 100644 index 5e41489..0000000 --- a/test-chill/makeparser.py +++ /dev/null @@ -1,9 +0,0 @@ -import pylang.parser -import pickle - -if __name__ == '__main__': - gstream = open('testchill/cpp_validate/grammar.txt', 'r') - env = dict() - exec('from testchill._cpp_validate_env import *', None, env) - parser = pylang.parser.generate(gstream, env) - pickle.dump(parser, open('testchill/cpp_validate/parser.pickle', 'wb'), 2) diff --git a/test-chill/test-cases/chill/mm.c b/test-chill/mm.c index 354d929..354d929 100644 --- a/test-chill/test-cases/chill/mm.c +++ b/test-chill/mm.c diff --git a/test-chill/runtests b/test-chill/runtests new file mode 100755 index 0000000..e5021f8 --- /dev/null +++ b/test-chill/runtests @@ -0,0 +1,17 @@ +#/bin/sh +for file in *.py; do + echo -n "Testing " + echo -n $file | sed 's/test_//g;s/.py//g' + echo -n " ... " + ../chill $file > /dev/null 2>&1 + cmp -s rose_mm.c with/$file.out + if [ $? -eq 0 ] + then echo OK + else + cmp -s rose_mm.c without/$file.out + if [ $? -eq 0 ]; then echo OK; else echo failed; fi + fi +done +rm rose_mm.c + + diff --git a/test-chill/test-cases/chill-lua.tclist b/test-chill/test-cases/chill-lua.tclist deleted file mode 100644 index 39bd140..0000000 --- a/test-chill/test-cases/chill-lua.tclist +++ /dev/null @@ -1,19 +0,0 @@ - -#chill-testcase test-cases/chill/test_distribute.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_fuse.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_known.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_original.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_peel.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_permute.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_print_code.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_print_dep.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_print_space.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_reverse.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_scale.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_shift.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_shift_to.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_skew.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_tile.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_unroll_extra.lua test-cases/chill/mm.c --check-run-script -#chill-testcase test-cases/chill/test_unroll.lua test-cases/chill/mm.c --check-run-script - diff --git a/test-chill/test-cases/chill-python.tclist b/test-chill/test-cases/chill-python.tclist deleted file mode 100644 index ee6c54c..0000000 --- a/test-chill/test-cases/chill-python.tclist +++ /dev/null @@ -1,19 +0,0 @@ - -chill-testcase test-cases/chill/test_distribute.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_fuse.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_known.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_original.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_peel.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_permute.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_print_code.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_print_dep.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_print_space.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_reverse.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_scale.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_shift.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_shift_to.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_skew.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_tile.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_unroll_extra.py test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_unroll.py test-cases/chill/mm.c --check-run-script - diff --git a/test-chill/test-cases/chill-script.tclist b/test-chill/test-cases/chill-script.tclist deleted file mode 100644 index 117ee0d..0000000 --- a/test-chill/test-cases/chill-script.tclist +++ /dev/null @@ -1,36 +0,0 @@ - -chill-testcase test-cases/chill/test_distribute.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_fuse.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_known.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_original.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_peel.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_permute.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_print_code.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_print_dep.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_print_space.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_reverse.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_scale.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_shift.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_shift_to.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_skew.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_tile.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_unroll_extra.script test-cases/chill/mm.c --check-run-script -chill-testcase test-cases/chill/test_unroll.script test-cases/chill/mm.c --check-run-script - -chill-testcase test-cases/examples/chill/gemm.script test-cases/examples/chill/gemm.c -chill-testcase test-cases/examples/chill/gemv.script test-cases/examples/chill/gemv.c -chill-testcase test-cases/examples/chill/jacobi1.script test-cases/examples/chill/jacobi1.c -chill-testcase test-cases/examples/chill/jacobi2.script test-cases/examples/chill/jacobi2.c -chill-testcase test-cases/examples/chill/qr.script test-cases/examples/chill/qr.c -#chill-testcase test-cases/examples/chill/scalar_test.script test-cases/examples/chill/scalar_test.c --check-run-script --fail-run-script -chill-testcase test-cases/examples/chill/swim.script test-cases/examples/chill/swim.c -chill-testcase test-cases/examples/chill/test_align.script test-cases/examples/chill/test_align.c -#chill-testcase test-cases/examples/chill/test_fusion.script test-cases/examples/chill/test_fusion.c --check-run-script --fail-run-script -#chill-testcase test-cases/examples/chill/test_lex_order.script test-cases/examples/chill/test_lex_order.c --check-run-script --fail-run-script -chill-testcase test-cases/examples/chill/test_split.script test-cases/examples/chill/test_split.c -#chill-testcase test-cases/examples/chill/test_split2.script test-cases/examples/chill/test_split2.c --check-run-script --fail-run-script -chill-testcase test-cases/examples/chill/test_tile.script test-cases/examples/chill/test_tile.c -#chill-testcase test-cases/examples/chill/tile_violation.script test-cases/examples/chill/tile_violation.c --check-run-script --fail-run-script -chill-testcase test-cases/examples/chill/unroll.script test-cases/examples/chill/unroll.c -#chill-testcase test-cases/examples/chill/unroll_violation.script test-cases/examples/chill/unroll_violation.c --check-run-script --fail-run-script - diff --git a/test-chill/test-cases/chill/test_distribute.script b/test-chill/test-cases/chill/test_distribute.script deleted file mode 100644 index 2476e8d..0000000 --- a/test-chill/test-cases/chill/test_distribute.script +++ /dev/null @@ -1,10 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -distribute([0,1], 1) -print diff --git a/test-chill/test-cases/chill/test_distribute.stdout b/test-chill/test-cases/chill/test_distribute.stdout deleted file mode 100644 index f6aa1a8..0000000 --- a/test-chill/test-cases/chill/test_distribute.stdout +++ /dev/null @@ -1,14 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2,t4,0); - } -} -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - for(t6 = 0; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_fuse.script b/test-chill/test-cases/chill/test_fuse.script deleted file mode 100644 index 6578ad2..0000000 --- a/test-chill/test-cases/chill/test_fuse.script +++ /dev/null @@ -1,12 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -distribute([0,1], 1) -print -fuse([0,1], 1) -print diff --git a/test-chill/test-cases/chill/test_fuse.stdout b/test-chill/test-cases/chill/test_fuse.stdout deleted file mode 100644 index 922d511..0000000 --- a/test-chill/test-cases/chill/test_fuse.stdout +++ /dev/null @@ -1,25 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2,t4,0); - } -} -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - for(t6 = 0; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - } -} - - -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2,t4,0); - s1(t2,t4,0); - for(t6 = 1; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_known.script b/test-chill/test-cases/chill/test_known.script deleted file mode 100644 index 6772e18..0000000 --- a/test-chill/test-cases/chill/test_known.script +++ /dev/null @@ -1,9 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -print diff --git a/test-chill/test-cases/chill/test_known.stdout b/test-chill/test-cases/chill/test_known.stdout deleted file mode 100644 index 6975a99..0000000 --- a/test-chill/test-cases/chill/test_known.stdout +++ /dev/null @@ -1,11 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2,t4,0); - s1(t2,t4,0); - for(t6 = 1; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_original.script b/test-chill/test-cases/chill/test_original.script deleted file mode 100644 index 8f07121..0000000 --- a/test-chill/test-cases/chill/test_original.script +++ /dev/null @@ -1,12 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 4) -known(an > 0) -known(bm > 0) -peel(1,3,4) -print -original() -print diff --git a/test-chill/test-cases/chill/test_original.stdout b/test-chill/test-cases/chill/test_original.stdout deleted file mode 100644 index 5121763..0000000 --- a/test-chill/test-cases/chill/test_original.stdout +++ /dev/null @@ -1,28 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s2(t2,t4,0); - s3(t2,t4,0); - s4(t2,t4,1); - s5(t2,t4,2); - s6(t2,t4,3); - for(t6 = 4; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - } -} - - -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s2(t2,t4,0); - s3(t2,t4,0); - s4(t2,t4,1); - s5(t2,t4,2); - s6(t2,t4,3); - for(t6 = 4; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_peel.script b/test-chill/test-cases/chill/test_peel.script deleted file mode 100644 index 121868e..0000000 --- a/test-chill/test-cases/chill/test_peel.script +++ /dev/null @@ -1,10 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 4) -known(an > 0) -known(bm > 0) -peel(1,3,4) -print diff --git a/test-chill/test-cases/chill/test_peel.stdout b/test-chill/test-cases/chill/test_peel.stdout deleted file mode 100644 index 7096b21..0000000 --- a/test-chill/test-cases/chill/test_peel.stdout +++ /dev/null @@ -1,14 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s2(t2,t4,0); - s3(t2,t4,0); - s4(t2,t4,1); - s5(t2,t4,2); - s6(t2,t4,3); - for(t6 = 4; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_permute.script b/test-chill/test-cases/chill/test_permute.script deleted file mode 100644 index 946bff5..0000000 --- a/test-chill/test-cases/chill/test_permute.script +++ /dev/null @@ -1,10 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -permute([3,1,2]) -print diff --git a/test-chill/test-cases/chill/test_permute.stdout b/test-chill/test-cases/chill/test_permute.stdout deleted file mode 100644 index 0268d6b..0000000 --- a/test-chill/test-cases/chill/test_permute.stdout +++ /dev/null @@ -1,17 +0,0 @@ -for(t2 = 0; t2 <= ambn-1; t2++) { - for(t4 = 0; t4 <= an-1; t4++) { - if (t2 <= 0) { - for(t6 = 0; t6 <= bm-1; t6++) { - s0(t4,t6,t2); - s1(t4,t6,t2); - } - } - else { - for(t6 = 0; t6 <= bm-1; t6++) { - s1(t4,t6,t2); - } - } - } -} - - diff --git a/test-chill/test-cases/chill/test_print_code.script b/test-chill/test-cases/chill/test_print_code.script deleted file mode 100644 index 20c8364..0000000 --- a/test-chill/test-cases/chill/test_print_code.script +++ /dev/null @@ -1,7 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -print diff --git a/test-chill/test-cases/chill/test_print_code.stdout b/test-chill/test-cases/chill/test_print_code.stdout deleted file mode 100644 index b4ece20..0000000 --- a/test-chill/test-cases/chill/test_print_code.stdout +++ /dev/null @@ -1,18 +0,0 @@ -if (bm >= 1) { - for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - if (ambn >= 1) { - s0(t2,t4,0); - s1(t2,t4,0); - } - for(t6 = 1; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - } - if (ambn <= 0) { - s0(t2,t4,0); - } - } - } -} - - diff --git a/test-chill/test-cases/chill/test_print_dep.script b/test-chill/test-cases/chill/test_print_dep.script deleted file mode 100644 index 99dc567..0000000 --- a/test-chill/test-cases/chill/test_print_dep.script +++ /dev/null @@ -1,7 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -print dep diff --git a/test-chill/test-cases/chill/test_print_dep.stdout b/test-chill/test-cases/chill/test_print_dep.stdout deleted file mode 100644 index ab679a3..0000000 --- a/test-chill/test-cases/chill/test_print_dep.stdout +++ /dev/null @@ -1,4 +0,0 @@ -dependence graph: -1->2: C:flow(0, 0, +) C:flow(0, 0, 0) C:output(0, 0, +) C:output(0, 0, 0) -2->2: C:anti(0, 0, +) C:output(0, 0, +) - diff --git a/test-chill/test-cases/chill/test_print_space.script b/test-chill/test-cases/chill/test_print_space.script deleted file mode 100644 index d8c81df..0000000 --- a/test-chill/test-cases/chill/test_print_space.script +++ /dev/null @@ -1,7 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -print space diff --git a/test-chill/test-cases/chill/test_print_space.stdout b/test-chill/test-cases/chill/test_print_space.stdout deleted file mode 100644 index f97c8c1..0000000 --- a/test-chill/test-cases/chill/test_print_space.stdout +++ /dev/null @@ -1,3 +0,0 @@ -s0: { Sym=[bm,an] [t1,t2,t3,t4,t5,t6,t7] : t1 = 0 && t3 = 0 && t5 = 0 && t7 = 0 && t6 = 0 && 0 <= t2 < an && 0 <= t4 < bm } -s1: { Sym=[ambn,bm,an] [t1,t2,t3,t4,t5,t6,t7] : t1 = 0 && t3 = 0 && t5 = 0 && t7 = 0 && 0 <= t2 < an && 0 <= t6 < ambn && 0 <= t4 < bm } - diff --git a/test-chill/test-cases/chill/test_reverse.script b/test-chill/test-cases/chill/test_reverse.script deleted file mode 100644 index fc04d5c..0000000 --- a/test-chill/test-cases/chill/test_reverse.script +++ /dev/null @@ -1,12 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -distribute([0,1],1) -reverse([1],1) -reverse([1],2) -print diff --git a/test-chill/test-cases/chill/test_reverse.stdout b/test-chill/test-cases/chill/test_reverse.stdout deleted file mode 100644 index 182b822..0000000 --- a/test-chill/test-cases/chill/test_reverse.stdout +++ /dev/null @@ -1,14 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2,t4,0); - } -} -for(t2 = -an+1; t2 <= 0; t2++) { - for(t4 = -bm+1; t4 <= 0; t4++) { - for(t6 = 0; t6 <= ambn-1; t6++) { - s1(-t2,-t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_scale.script b/test-chill/test-cases/chill/test_scale.script deleted file mode 100644 index 20611ec..0000000 --- a/test-chill/test-cases/chill/test_scale.script +++ /dev/null @@ -1,13 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -distribute([0,1],1) -scale([1],1,4) -scale([1],2,4) -print diff --git a/test-chill/test-cases/chill/test_scale.stdout b/test-chill/test-cases/chill/test_scale.stdout deleted file mode 100644 index 049451c..0000000 --- a/test-chill/test-cases/chill/test_scale.stdout +++ /dev/null @@ -1,14 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2,t4,0); - } -} -for(t2 = 0; t2 <= 4*an-4; t2 += 4) { - for(t4 = 0; t4 <= 4*bm-4; t4 += 4) { - for(t6 = 0; t6 <= ambn-1; t6++) { - s1(t2/4,t4/4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_shift.script b/test-chill/test-cases/chill/test_shift.script deleted file mode 100644 index d3d67aa..0000000 --- a/test-chill/test-cases/chill/test_shift.script +++ /dev/null @@ -1,11 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -shift([1],1,4) -print diff --git a/test-chill/test-cases/chill/test_shift.stdout b/test-chill/test-cases/chill/test_shift.stdout deleted file mode 100644 index 2b96895..0000000 --- a/test-chill/test-cases/chill/test_shift.stdout +++ /dev/null @@ -1,24 +0,0 @@ -for(t2 = 0; t2 <= an+3; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - if (an >= t2+1) { - s0(t2,t4,0); - if (t2 >= 4) { - s1(t2-4,t4,0); - } - if (t2 >= 4) { - for(t6 = 1; t6 <= ambn-1; t6++) { - s1(t2-4,t4,t6); - } - } - } - else { - if (t2 >= 4) { - for(t6 = 0; t6 <= ambn-1; t6++) { - s1(t2-4,t4,t6); - } - } - } - } -} - - diff --git a/test-chill/test-cases/chill/test_shift_to.script b/test-chill/test-cases/chill/test_shift_to.script deleted file mode 100644 index 64a6443..0000000 --- a/test-chill/test-cases/chill/test_shift_to.script +++ /dev/null @@ -1,11 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -shift_to(1,1,4) -print diff --git a/test-chill/test-cases/chill/test_shift_to.stdout b/test-chill/test-cases/chill/test_shift_to.stdout deleted file mode 100644 index 820d83f..0000000 --- a/test-chill/test-cases/chill/test_shift_to.stdout +++ /dev/null @@ -1,11 +0,0 @@ -for(t2 = 4; t2 <= an+3; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2-4,t4,0); - s1(t2-4,t4,0); - for(t6 = 1; t6 <= ambn-1; t6++) { - s1(t2-4,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_skew.script b/test-chill/test-cases/chill/test_skew.script deleted file mode 100644 index e9cf75a..0000000 --- a/test-chill/test-cases/chill/test_skew.script +++ /dev/null @@ -1,11 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -skew([1],1,[4]) -print diff --git a/test-chill/test-cases/chill/test_skew.stdout b/test-chill/test-cases/chill/test_skew.stdout deleted file mode 100644 index a1b36f8..0000000 --- a/test-chill/test-cases/chill/test_skew.stdout +++ /dev/null @@ -1,22 +0,0 @@ -for(t2 = 0; t2 <= 4*an-4; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - if (an >= t2+1) { - s0(t2,t4,0); - if (intMod(t2,4) == 0) { - s1(t2/4,t4,0); - } - } - else { - if (intMod(t2,4) == 0) { - s1(t2/4,t4,0); - } - } - if (intMod(t2,4) == 0) { - for(t6 = 1; t6 <= ambn-1; t6++) { - s1(t2/4,t4,t6); - } - } - } -} - - diff --git a/test-chill/test-cases/chill/test_tile.script b/test-chill/test-cases/chill/test_tile.script deleted file mode 100644 index de27998..0000000 --- a/test-chill/test-cases/chill/test_tile.script +++ /dev/null @@ -1,7 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -tile(0, 2, 4) -print diff --git a/test-chill/test-cases/chill/test_tile.stdout b/test-chill/test-cases/chill/test_tile.stdout deleted file mode 100644 index 0a2d89a..0000000 --- a/test-chill/test-cases/chill/test_tile.stdout +++ /dev/null @@ -1,20 +0,0 @@ -if (an >= 1) { - for(t2 = 0; t2 <= bm-1; t2 += 4) { - for(t4 = 0; t4 <= an-1; t4++) { - for(t6 = t2; t6 <= min(bm-1,t2+3); t6++) { - if (ambn >= 1) { - s0(t4,t6,0); - s1(t4,t6,0); - } - for(t8 = 1; t8 <= ambn-1; t8++) { - s1(t4,t6,t8); - } - if (ambn <= 0) { - s0(t4,t6,0); - } - } - } - } -} - - diff --git a/test-chill/test-cases/chill/test_unroll.script b/test-chill/test-cases/chill/test_unroll.script deleted file mode 100644 index bd19bd1..0000000 --- a/test-chill/test-cases/chill/test_unroll.script +++ /dev/null @@ -1,11 +0,0 @@ -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -distribute([0,1], 1) -unroll(1, 3, 4) -print diff --git a/test-chill/test-cases/chill/test_unroll.stdout b/test-chill/test-cases/chill/test_unroll.stdout deleted file mode 100644 index 71616bf..0000000 --- a/test-chill/test-cases/chill/test_unroll.stdout +++ /dev/null @@ -1,19 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s0(t2,t4,0); - } -} -for(t2 = 0; t2 <= an-1; t2++) { - for(t4 = 0; t4 <= bm-1; t4++) { - s2(t2,t4); - for(t6 = 0; t6 <= -over1+ambn-1; t6 += 4) { - s1(t2,t4,t6); - s4(t2,t4,t6); - } - for(t6 = max(0,ambn-over1); t6 <= ambn-1; t6++) { - s3(t2,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/chill/test_unroll_extra.script b/test-chill/test-cases/chill/test_unroll_extra.script deleted file mode 100644 index fae244e..0000000 --- a/test-chill/test-cases/chill/test_unroll_extra.script +++ /dev/null @@ -1,11 +0,0 @@ - -source: mm.c -procedure: mm -format: rose -loop: 0 - -known(ambn > 0) -known(an > 0) -known(bm > 0) -unroll_extra(1, 2, 4) -print diff --git a/test-chill/test-cases/chill/test_unroll_extra.stdout b/test-chill/test-cases/chill/test_unroll_extra.stdout deleted file mode 100644 index eca65f2..0000000 --- a/test-chill/test-cases/chill/test_unroll_extra.stdout +++ /dev/null @@ -1,28 +0,0 @@ -for(t2 = 0; t2 <= an-1; t2++) { - s2(t2); - for(t4 = 0; t4 <= -over1+bm-1; t4 += 4) { - s0(t2,t4,0); - s1(t2,t4,0); - s5(t2,t4,0); - s6(t2,t4,0); - s7(t2,t4,0); - s8(t2,t4,0); - s9(t2,t4,0); - s10(t2,t4,0); - for(t6 = 1; t6 <= ambn-1; t6++) { - s1(t2,t4,t6); - s6(t2,t4,t6); - s8(t2,t4,t6); - s10(t2,t4,t6); - } - } - for(t4 = max(bm-over1,0); t4 <= bm-1; t4++) { - s3(t2,t4,0); - s4(t2,t4,0); - for(t6 = 1; t6 <= ambn-1; t6++) { - s4(t2,t4,t6); - } - } -} - - diff --git a/test-chill/test-cases/cuda-chill-lua.tclist b/test-chill/test-cases/cuda-chill-lua.tclist deleted file mode 100644 index d2e91dc..0000000 --- a/test-chill/test-cases/cuda-chill-lua.tclist +++ /dev/null @@ -1,13 +0,0 @@ - -chill-testcase -u test-cases/examples/cuda-chill/cp.lua test-cases/examples/cuda-chill/cp.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/mm.lua test-cases/examples/cuda-chill/mm.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/mpeg4.lua test-cases/examples/cuda-chill/mpeg4.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/mriq.lua test-cases/examples/cuda-chill/mriq.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/mriq-fh.lua test-cases/examples/cuda-chill/mriq-fh.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/mv.lua test-cases/examples/cuda-chill/mv.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/mv-shadow.lua test-cases/examples/cuda-chill/mv-shadow.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/mv_try.lua test-cases/examples/cuda-chill/mv_try.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/nbody.lua test-cases/examples/cuda-chill/nbody.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/tmv.lua test-cases/examples/cuda-chill/tmv.c --no-compile-gensrc -chill-testcase -u test-cases/examples/cuda-chill/tmv-shadow.lua test-cases/examples/cuda-chill/tmv-shadow.c --no-compile-gensrc - diff --git a/test-chill/test-cases/cuda-chill-python.tclist b/test-chill/test-cases/cuda-chill-python.tclist deleted file mode 100644 index 8b13789..0000000 --- a/test-chill/test-cases/cuda-chill-python.tclist +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test-chill/test-cases/examples/chill/gemm.c b/test-chill/test-cases/examples/chill/gemm.c deleted file mode 100644 index 2c90ea5..0000000 --- a/test-chill/test-cases/examples/chill/gemm.c +++ /dev/null @@ -1,25 +0,0 @@ - -#ifndef N -#define N 512 -#endif - -/* -<test name=gemm define="{'N':512}"> -procedure int gemm( - in float[N][N] a = matrix([,], lambda i,j: random(2,-2)), - in float[N][N] b = matrix([,], lambda i,j: random(2,-2)), - out float[N][N] c = matrix([,], lambda i,j: 0)) -</test> -*/ -int gemm(float a[N][N], float b[N][N], float c[N][N]) { - int i, j, k; - int n = N; - for (j = 0; j < n; j++) - for (k = 0; k < n; k++) - for (i = 0; i < n; i++) { - c[i][j] = c[i][j] + a[i][k] * b[k][j]; - } - - return 0; -} - diff --git a/test-chill/test-cases/examples/chill/gemm.script b/test-chill/test-cases/examples/chill/gemm.script deleted file mode 100644 index 393f236..0000000 --- a/test-chill/test-cases/examples/chill/gemm.script +++ /dev/null @@ -1,31 +0,0 @@ -#matrix multiply large array size for intel machine -source: gemm.c -procedure: gemm -format: rose -loop: 0 - -TI = 128 -TJ = 8 -TK = 512 -UI = 2 -UJ = 2 - -permute([3,1,2]) -tile(0,2,TJ) -#print space -tile(0,2,TI) -#print space -tile(0,5,TK) -#print space - -datacopy(0,3,a,false,1) -#print space - -datacopy(0,4,b) -print -unroll(0,4,UI)#print space -print -unroll(0,5,UJ) -#print space -print - diff --git a/test-chill/test-cases/examples/chill/gemv.c b/test-chill/test-cases/examples/chill/gemv.c deleted file mode 100644 index 39b083c..0000000 --- a/test-chill/test-cases/examples/chill/gemv.c +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef N -#define N 512 -#endif - -/* -<test name=gemv define="{'N':512}"> -procedure int gemv( - out float[N] a = matrix([], lambda i: random(2,-2)), - in float[N] b = matrix([], lambda i: random(2,-2)), - in float[N][N] c = matrix([,], lambda i,j: random(2,-2))) -</test> -*/ -int gemv(float a[N], float b[N], float c[N][N]) { - int i, j; - - for (i = 1; i < N; i++) - for (j = 1; j < N; j++) - a[i] = a[i] + c[i][j] * b[j]; - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/gemv.script b/test-chill/test-cases/examples/chill/gemv.script deleted file mode 100644 index 73b3b58..0000000 --- a/test-chill/test-cases/examples/chill/gemv.script +++ /dev/null @@ -1,9 +0,0 @@ -source: gemv.c # matrix-vector multiply -procedure: gemv -format : rose -loop: 0 - - - -original() -print diff --git a/test-chill/test-cases/examples/chill/jacobi1.c b/test-chill/test-cases/examples/chill/jacobi1.c deleted file mode 100644 index e7ff8f8..0000000 --- a/test-chill/test-cases/examples/chill/jacobi1.c +++ /dev/null @@ -1,19 +0,0 @@ - -#ifndef N -#define N 512 -#endif - -/* -<test name=jacobi define="{'N':512}"> -procedure int jacobi( - in out float[N][N] a = matrix [i,j] random(2,-2)) -</test> -*/ -int jacobi(float a[N][N]) { - int t, i; - for (t = 2; t <= 100; t++) - for (i = 2; i <= N - 1; i++) - a[t][i] = a[t - 1][i - 1] + a[t - 1][i] + a[t - 1][i + 1]; - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/jacobi1.script b/test-chill/test-cases/examples/chill/jacobi1.script deleted file mode 100644 index 604f763..0000000 --- a/test-chill/test-cases/examples/chill/jacobi1.script +++ /dev/null @@ -1,18 +0,0 @@ -# -# tiling perfect jacobi loop nest with time step, use -# unimodular transformation first (only applicable to the -# perfect loop nest) to make tiling legal. -# - -source: jacobi1.c -procedure: jacobi -format : rose -loop: 0 - -print dep - -nonsingular([[1,0],[1,1]]) # unimodular matrix, determinant is one -tile(0,2,64) - -print dep -print diff --git a/test-chill/test-cases/examples/chill/jacobi2.c b/test-chill/test-cases/examples/chill/jacobi2.c deleted file mode 100644 index b8d8d7b..0000000 --- a/test-chill/test-cases/examples/chill/jacobi2.c +++ /dev/null @@ -1,15 +0,0 @@ -#define N 512 - -int main() { - double a[N]; - double b[N]; - int t, i; - for (t = 1; t <= 100; t++) { - for (i = 2; i <= N - 1; i++) - b[i] = (double) 0.25 * (a[i - 1] + a[i + 1]) + (double) 0.5 * a[i]; - - for (i = 2; i <= N - 1; i++) - a[i] = b[i]; - } - return 0; -} diff --git a/test-chill/test-cases/examples/chill/jacobi2.script b/test-chill/test-cases/examples/chill/jacobi2.script deleted file mode 100644 index afe14c6..0000000 --- a/test-chill/test-cases/examples/chill/jacobi2.script +++ /dev/null @@ -1,21 +0,0 @@ -# -# tiling imperfect jacobi loop nest, more details in the paper -# "Automatic Tiling of Iterative Stencil Loops" by Zhiyuan Li and -# Yonghong Song, TOPLAS, 2004. -# - -source: jacobi2.c -procedure: main -format: rose -loop: 0 - -print dep - -original() -shift([1], 2, 1) -fuse([0,1], 2) # optional -skew([0,1], 2, [2,1]) -tile(0, 2, 32, 1) - -print dep -print diff --git a/test-chill/test-cases/examples/chill/qr.c b/test-chill/test-cases/examples/chill/qr.c deleted file mode 100644 index 8d18b72..0000000 --- a/test-chill/test-cases/examples/chill/qr.c +++ /dev/null @@ -1,44 +0,0 @@ -#include <math.h> - -int main() { - - int M, N; - float** A; - float *s; - float *Rdiag; - float *nrm; - int i, j, k; - float t; - for (k = 0; k < N; k++) { - nrm[k] = 0; - - for (i = k; i < M; i++) - nrm[k] = sqrt(nrm[k] * nrm[k] + A[i][k] * A[i][k]); - //t = A[k][k]; - - //if (t < 0) - // nrm[k] = -nrm[k]; - for (i = k; i < M; i++) - A[i][k] = A[i][k] / nrm[k]; - - A[k][k] = A[k][k] + 1; - - for (j = k + 1; j < N; j++) { - s[j] = 0; //S6 - - for (i = k; i < M; i++) - s[j] = s[j] + A[i][k] * A[i][j]; //S7 - - s[j] = -s[j] / A[k][k]; //S8 - - for (i = k; i < M; i++) - A[i][j] = A[i][j] + s[j] * A[i][k]; //S9 - - } - - Rdiag[k] = -nrm[k]; - - } - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/qr.script b/test-chill/test-cases/examples/chill/qr.script deleted file mode 100644 index 6b4cd46..0000000 --- a/test-chill/test-cases/examples/chill/qr.script +++ /dev/null @@ -1,13 +0,0 @@ -# -# tiling imperfect jacobi loop nest, more details in the paper -# "Automatic Tiling of Iterative Stencil Loops" by Zhiyuan Li and -# Yonghong Song, TOPLAS, 2004. -# - -source: qr.c -procedure: main -format: rose -loop: 0 -original() -print - diff --git a/test-chill/test-cases/examples/chill/scalar_test.c b/test-chill/test-cases/examples/chill/scalar_test.c deleted file mode 100644 index 733c882..0000000 --- a/test-chill/test-cases/examples/chill/scalar_test.c +++ /dev/null @@ -1,16 +0,0 @@ -int a[10][10]; -int main() { - - int temp; - int i, j; - - for (i = 0; i < 10; i++) { - for (j = 0; j < 10; j++) { - a[i + 1][j - 1] = a[i][j]; - } - - } - - return 0; - -} diff --git a/test-chill/test-cases/examples/chill/scalar_test.script b/test-chill/test-cases/examples/chill/scalar_test.script deleted file mode 100644 index f5b0aa8..0000000 --- a/test-chill/test-cases/examples/chill/scalar_test.script +++ /dev/null @@ -1,10 +0,0 @@ -#Simple Scalar dependence check -source: scalar_test.c -procedure: main -format : rose -loop: 0 - -original() -permute([2,1]) -print dep -print space diff --git a/test-chill/test-cases/examples/chill/swim.c b/test-chill/test-cases/examples/chill/swim.c deleted file mode 100644 index a21ef24..0000000 --- a/test-chill/test-cases/examples/chill/swim.c +++ /dev/null @@ -1,159 +0,0 @@ -#define M 100 -#define N 100 -#define N3 10 - -int main() { - - int DX; - int DY; - int FSDX; - int FSDY; - int TDT; - int TDTS8; - int TDTSDX; - int TDTSDY; - int t, i, j; - double CU[M + 1][N + 1]; - double CV[M + 1][N + 1]; - double Z[M + 1][N + 1]; - double H[M + 1][N + 1]; - double P[M + 1][N + 1]; - double U[M + 1][N + 1]; - double V[M + 1][N + 1]; - double UNEW[M + 1][N + 1]; - double UOLD[M + 1][N + 1]; - double PNEW[M + 1][N + 1]; - double POLD[M + 1][N + 1]; - double VNEW[M + 1][N + 1]; - double VOLD[M + 1][N + 1]; - double ALPHA; - - for (t = 0; t < N3; t++) { - - FSDX = 4 / DX; - FSDY = 4 / DY; - - for (i = 0; i < M; i++) { - for (j = 0; j < N; j++) { - CU[i + 1][j] = (double) 0.5 * (P[i + 1][j] + P[i][j]) - * U[i + 1][j]; - CV[i][j + 1] = (double) 0.5 * (P[i][j + 1] + P[i][j]) - * V[i][j + 1]; - Z[i + 1][j + 1] = - (FSDX * (V[i + 1][j + 1] - V[i][j + 1]) - - FSDY * (U[i + 1][j + 1] - U[i + 1][j])) - / (P[i][j] + P[i + 1][j] + P[i + 1][j + 1] - + P[i][j + 1]); - H[i][j] = P[i][j] - + (double) 0.25 - * (U[i + 1][j] * U[i + 1][j] + U[i][j] * U[i][j] - + V[i][j + 1] * V[i][j + 1] - + V[i][j] * V[i][j]); - } - } - - for (j = 0; j < N; j++) { - // CU[0][j] = CU[M+1][j]; - CU[0][j] = CU[M][j]; - CV[M][j + 1] = CV[0][j + 1]; - Z[0][j + 1] = Z[M][j + 1]; - H[M][j] = H[0][j]; - } - - for (i = 0; i < M; i++) { - CU[i + 1][N] = CU[i + 1][0]; - CV[i][0] = CV[i][N]; - Z[i + 1][0] = Z[i + 1][N]; - H[i][N] = H[i][0]; - } - - CU[0][N] = CU[M][0]; - CV[M][0] = CV[0][N]; - Z[0][0] = Z[M][N]; - H[M][N] = H[0][0]; - - TDTS8 = TDT / 8; - TDTSDX = TDT / DX; - TDTSDY = TDT / DY; - - for (i = 0; i < M; i++) { - for (j = 0; j < N; j++) { - UNEW[i + 1][j] = UOLD[i + 1][j] - + TDTS8 * (Z[i + 1][j + 1] + Z[i + 1][j]) - * (CV[i + 1][j + 1] + CV[i][j + 1] + CV[i][j] - + CV[i + 1][j]) - - TDTSDX * (H[i + 1][j] - H[i][j]); - VNEW[i][j + 1] = VOLD[i][j + 1] - - TDTS8 * (Z[i + 1][j + 1] + Z[i][j + 1]) - * (CU[i + 1][j + 1] + CU[i][j + 1] + CU[i][j] - + CU[i + 1][j]) - - TDTSDY * (H[i][j + 1] - H[i][j]); - PNEW[i][j] = POLD[i][j] - TDTSDX * (CU[i + 1][j] - CU[i][j]) - - TDTSDY * (CV[i][j + 1] - CV[i][j]); - } - } - for (j = 0; j < N; j++) { - UNEW[0][j] = UNEW[M][j]; - VNEW[M][j + 1] = VNEW[0][j + 1]; - PNEW[M][j] = PNEW[0][j]; - } - - for (i = 0; i < M; i++) { - UNEW[i + 1][N] = UNEW[i + 1][0]; - VNEW[i][0] = VNEW[i][N]; - PNEW[i][N] = PNEW[i][0]; - } - - UNEW[0][N] = UNEW[M][0]; - VNEW[M][0] = VNEW[0][N]; - PNEW[M][N] = PNEW[0][0]; - // time = time + DT; - - for (i = 0; i < M; i++) { - for (j = 0; j < N; j++) { - UOLD[i][j] = U[i][j] - + ALPHA - * (UNEW[i][j] - (double) 2 * U[i][j] - + UOLD[i][j]); - VOLD[i][j] = V[i][j] - + ALPHA - * (VNEW[i][j] - (double) 2 * V[i][j] - + VOLD[i][j]); - POLD[i][j] = P[i][j] - + ALPHA - * (PNEW[i][j] - (double) 2 * P[i][j] - + POLD[i][j]); - U[i][j] = UNEW[i][j]; - V[i][j] = VNEW[i][j]; - P[i][j] = PNEW[i][j]; - } - } - - for (j = 0; j < N; j++) { - UOLD[M][j] = UOLD[0][j]; - VOLD[M][j] = VOLD[0][j]; - POLD[M][j] = POLD[0][j]; - U[M][j] = U[0][j]; - V[M][j] = V[0][j]; - P[M][j] = P[0][j]; - } - - for (i = 0; i < M; i++) { - UOLD[i][N] = UOLD[i][0]; - VOLD[i][N] = VOLD[i][0]; - POLD[i][N] = POLD[i][0]; - U[i][N] = U[i][0]; - V[i][N] = V[i][0]; - P[i][N] = P[i][0]; - } - - UOLD[M][N] = UOLD[0][0]; - VOLD[M][N] = VOLD[0][0]; - POLD[M][N] = POLD[0][0]; - U[M][N] = U[0][0]; - V[M][N] = V[0][0]; - P[M][N] = P[0][0]; - - } - return 0; -} diff --git a/test-chill/test-cases/examples/chill/swim.script b/test-chill/test-cases/examples/chill/swim.script deleted file mode 100644 index 79de9d9..0000000 --- a/test-chill/test-cases/examples/chill/swim.script +++ /dev/null @@ -1,13 +0,0 @@ -# -# tiling imperfect jacobi loop nest, more details in the paper -# "Automatic Tiling of Iterative Stencil Loops" by Zhiyuan Li and -# Yonghong Song, TOPLAS, 2004. -# - -source: swim.c -procedure: main -format: rose -loop: 0 -original() -#print space -print diff --git a/test-chill/test-cases/examples/chill/test_align.c b/test-chill/test-cases/examples/chill/test_align.c deleted file mode 100644 index d1365ca..0000000 --- a/test-chill/test-cases/examples/chill/test_align.c +++ /dev/null @@ -1,20 +0,0 @@ -int main() { - - int m, n; - int a[10], b[10]; - int i, j; - for (i = 0; i < n; i++) { - for (j = 0; j < n; j++) { - a[i] = 1; - } - - for (j = 0; j < n; j++) { - b[i] -= 1; - } - - } - - return 0; - -} - diff --git a/test-chill/test-cases/examples/chill/test_align.script b/test-chill/test-cases/examples/chill/test_align.script deleted file mode 100644 index c990e22..0000000 --- a/test-chill/test-cases/examples/chill/test_align.script +++ /dev/null @@ -1,12 +0,0 @@ -#matrix multiply large array size for intel machine -source: test_align.c -procedure: main -format: rose -loop: 0 - -original() - - - -print - diff --git a/test-chill/test-cases/examples/chill/test_fusion.c b/test-chill/test-cases/examples/chill/test_fusion.c deleted file mode 100644 index bd2c4f2..0000000 --- a/test-chill/test-cases/examples/chill/test_fusion.c +++ /dev/null @@ -1,13 +0,0 @@ -int main() { - - int a[10][10]; - int i, j; - for (i = 0; i < 10; i++) { - for (j = 0; j < 10; j++) - a[i][j] = a[i][j] + 5; - for (j = 0; j < 10; j++) - a[i][j + 1] = a[i][j + 1] + 5; - - } - -} diff --git a/test-chill/test-cases/examples/chill/test_fusion.script b/test-chill/test-cases/examples/chill/test_fusion.script deleted file mode 100644 index 41f6cc0..0000000 --- a/test-chill/test-cases/examples/chill/test_fusion.script +++ /dev/null @@ -1,7 +0,0 @@ -source: test_fusion.c -procedure: main -loop: 0 -original() -fuse([0,1],2) -print - diff --git a/test-chill/test-cases/examples/chill/test_lex_order.c b/test-chill/test-cases/examples/chill/test_lex_order.c deleted file mode 100644 index 1a3b26d..0000000 --- a/test-chill/test-cases/examples/chill/test_lex_order.c +++ /dev/null @@ -1,31 +0,0 @@ -int main() { - - int m, n; - int a[10]; - int b[10]; - int c[10]; - int i, j; - for (i = 0; i < n; i++) { - for (j = 0; j < n; j++) { - b[j] = a[j]; - } - - - - for (j = 0; j < n; j++) { - a[j+1] = 6; - } - - for (j = 0; j < n; j++) { - c[j] = a[j]; - } - - - - - } - - return 0; - -} - diff --git a/test-chill/test-cases/examples/chill/test_lex_order.script b/test-chill/test-cases/examples/chill/test_lex_order.script deleted file mode 100644 index 2629e50..0000000 --- a/test-chill/test-cases/examples/chill/test_lex_order.script +++ /dev/null @@ -1,12 +0,0 @@ -#matrix multiply large array size for intel machine -source: test_lex_order.c -procedure: main -format: rose -loop: 0 - -original() - - - -print - diff --git a/test-chill/test-cases/examples/chill/test_split.c b/test-chill/test-cases/examples/chill/test_split.c deleted file mode 100644 index 6ca62cc..0000000 --- a/test-chill/test-cases/examples/chill/test_split.c +++ /dev/null @@ -1,14 +0,0 @@ -int main() { - - int a[10][10][10][10]; - int i, j, k, l; - - for (i = 0; i < 10; i++) - for (j = 0; j < 10; j++) - for (k = 0; k < 10; k++) - for (l = 0; l < 10; l++) - a[i][j][k + 1][l] = a[i][j][k][l]; - // a[i+1][j-1] = a[i][j]; - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/test_split.script b/test-chill/test-cases/examples/chill/test_split.script deleted file mode 100644 index e1ebba9..0000000 --- a/test-chill/test-cases/examples/chill/test_split.script +++ /dev/null @@ -1,9 +0,0 @@ -source: test_split.c -procedure: main -format: rose -loop: 0 -original() -N=10 -split(0,1, L3-L2-L4 <= 5) -print - diff --git a/test-chill/test-cases/examples/chill/test_split2.c b/test-chill/test-cases/examples/chill/test_split2.c deleted file mode 100644 index 1ab8e43..0000000 --- a/test-chill/test-cases/examples/chill/test_split2.c +++ /dev/null @@ -1,14 +0,0 @@ -int main() { - - int a[10][10][10][10]; - int i, j, k, l; - - for (i = 0; i < 10; i++) - for (j = 0; j < 10; j++) - for (k = 0; k < 10; k++) - for (l = 0; l < 10; l++) - a[i][j][k + 1][l - 1] = a[i][j][k][l]; - // a[i+1][j-1] = a[i][j]; - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/test_split2.script b/test-chill/test-cases/examples/chill/test_split2.script deleted file mode 100644 index bcaa2a0..0000000 --- a/test-chill/test-cases/examples/chill/test_split2.script +++ /dev/null @@ -1,9 +0,0 @@ -source: test_split2.c -procedure: main -format: rose -loop: 0 -original() -N=10 -split(0,1, L4 <= 5) -print - diff --git a/test-chill/test-cases/examples/chill/test_tile.c b/test-chill/test-cases/examples/chill/test_tile.c deleted file mode 100644 index aeaaefc..0000000 --- a/test-chill/test-cases/examples/chill/test_tile.c +++ /dev/null @@ -1,16 +0,0 @@ -void func(int n) { - - int i; - int a[10]; - - for (i = 0; i < n; i++) - a[i] = 2; - -} - -int main() { - - func(10); - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/test_tile.script b/test-chill/test-cases/examples/chill/test_tile.script deleted file mode 100644 index d437145..0000000 --- a/test-chill/test-cases/examples/chill/test_tile.script +++ /dev/null @@ -1,14 +0,0 @@ -#matrix multiply large array size for intel machine -source: test_tile.c -procedure: func -format : rose -loop: 0 - -original() -#permute([3,2,1]) -tile(0,1,4) - - - -print - diff --git a/test-chill/test-cases/examples/chill/tile_violation.c b/test-chill/test-cases/examples/chill/tile_violation.c deleted file mode 100644 index d719e52..0000000 --- a/test-chill/test-cases/examples/chill/tile_violation.c +++ /dev/null @@ -1,12 +0,0 @@ -int main() { - - int i, j, k; - int a[10][10][10]; - - for (i = 0; i < 10; i++) - for (j = 0; j < 10; j++) - for (k = 0; k < 10; k++) - a[i][j + 1][k - 1] = a[i][j][k]; - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/tile_violation.script b/test-chill/test-cases/examples/chill/tile_violation.script deleted file mode 100644 index 57d1423..0000000 --- a/test-chill/test-cases/examples/chill/tile_violation.script +++ /dev/null @@ -1,14 +0,0 @@ -#matrix multiply large array size for intel machine -source: tile_violation.c -procedure: main -format :rose -loop: 0 - -original() -#permute([3,2,1]) -tile(0,3,2,1) - - - -print - diff --git a/test-chill/test-cases/examples/chill/unroll.c b/test-chill/test-cases/examples/chill/unroll.c deleted file mode 100644 index 68f4633..0000000 --- a/test-chill/test-cases/examples/chill/unroll.c +++ /dev/null @@ -1,31 +0,0 @@ -#define N 14 -void foo(int n, float* x, float* y, float* z, float* f3, float* f1, float* w) { - int dt; - - int i, j; - - for (i = 1; i <= 14; i++) - x[i] = 1.0; - - for (i = 1; i <= 14; i += 3) - y[i] = 1.0; - - for (i = N + 1; i <= N + 20; i += 3) - z[i] = 1.0; - - for (i = 0; i <= N; i++) { - for (j = i; j <= i + N; j++) - f3[i] = f3[i] + f1[j] * w[j - i]; - f3[i] = f3[i] * dt; - } - - return 0; -} - -int main() { - float x[N], y[N], z[N], f3[N], f1[N], w[N]; - - foo(N, x, y, z, f3, f1, w); - return 0; -} - diff --git a/test-chill/test-cases/examples/chill/unroll.script b/test-chill/test-cases/examples/chill/unroll.script deleted file mode 100644 index e64acb6..0000000 --- a/test-chill/test-cases/examples/chill/unroll.script +++ /dev/null @@ -1,35 +0,0 @@ -# -# Test unroll-and-jam. The last loop adapted from the simple -# convolution example from p463 of "Optimizing Compilers for -# Modern Architectures", by Randy Allen and Ken Kennedy. -# - -source: unroll.c -procedure: foo -format: rose -# fully unroll a loop with known iteration count -loop: 0 -original() -unroll(0,1,3) -print -print space - - -# a strided loop -loop: 1 -original() -unroll(0,1,2) -print -print space - -# lower and upper bounds are not constant -loop: 2 -original() -unroll(0,1,20) -print - -# parallelogram iteration space -loop: 3 -original() -unroll(0,1,2) -print diff --git a/test-chill/test-cases/examples/chill/unroll_violation.c b/test-chill/test-cases/examples/chill/unroll_violation.c deleted file mode 100644 index d719e52..0000000 --- a/test-chill/test-cases/examples/chill/unroll_violation.c +++ /dev/null @@ -1,12 +0,0 @@ -int main() { - - int i, j, k; - int a[10][10][10]; - - for (i = 0; i < 10; i++) - for (j = 0; j < 10; j++) - for (k = 0; k < 10; k++) - a[i][j + 1][k - 1] = a[i][j][k]; - - return 0; -} diff --git a/test-chill/test-cases/examples/chill/unroll_violation.script b/test-chill/test-cases/examples/chill/unroll_violation.script deleted file mode 100644 index 019473d..0000000 --- a/test-chill/test-cases/examples/chill/unroll_violation.script +++ /dev/null @@ -1,14 +0,0 @@ -#matrix multiply large array size for intel machine -source: unroll_violation.c -procedure: main -format: rose -loop: 0 - -original() -#permute([3,2,1]) -unroll(0,2,2) - - - -print - diff --git a/test-chill/test-cases/examples/cuda-chill/cp.c b/test-chill/test-cases/examples/cuda-chill/cp.c deleted file mode 100644 index 837d7a6..0000000 --- a/test-chill/test-cases/examples/cuda-chill/cp.c +++ /dev/null @@ -1,29 +0,0 @@ -#define N 1 - -#define VOLSIZEY 512 -#define VOLSIZEX 512 -#define VOLSIZEZ 1 -#define ATOMCOUNT 4000 -#define GRIDSPACING 0.1 -#define zDim 0 - -extern float sqrtf(float); - -void cenergy_cpu(float atoms[ATOMCOUNT*4],float *energy,float z) -{ -int i,j,n;float dx,dy,dz; - - for (j=0; j<VOLSIZEY; j++) { - for (i=0; i<VOLSIZEX; i++) { - for (n=0;n<ATOMCOUNT;n+=4) { - dx = (GRIDSPACING * i) - atoms[n]; - dy = (GRIDSPACING * j) - atoms[n+1]; - dz = z - atoms[n+2]; - energy[(j*VOLSIZEX + i)+VOLSIZEX*VOLSIZEY*zDim] += atoms[n+3]/sqrtf( (dx*dx) + (dy*dy)+ (dz*dz) ) ; - } - - - } - } -} - diff --git a/test-chill/test-cases/examples/cuda-chill/cp.lua b/test-chill/test-cases/examples/cuda-chill/cp.lua deleted file mode 100644 index 1ef2264..0000000 --- a/test-chill/test-cases/examples/cuda-chill/cp.lua +++ /dev/null @@ -1,46 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("cp.c", "cenergy_cpu", 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -V=512 -N=4000 -N=1 - -Tj=32 -Ti=16 -Tii=16 -Tjj=16 - ---normalize_index("j") ---normalize_index("i") -print_code() -normalize_index("n") --- TILE COMMANDS ZEROOOOOOOOOOO:3 ---permute(0,{"i","j","n"}) ---tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j","n"})--CU=-1 -tile_by_index({"j","i"},{Tj,Ti},{l1_control="jj",l2_control="ii"},{"jj","ii","j","i","n"})--CU=-1 ---tile_by_index({"n"},{Tn},{l1_control="nn"},{"jj","ii","nn","j","i","n"})--CU=-1 - ---tile_by_index({"j","i"},{Tjjj,Tiii},{l1_control="jjj",l2_control="iii"},{"jj","ii","nn","jjj","j","iii","i","n"})--CU=3 ---tile_by_index({"i","j"},{Tii,Tjj},{l1_control="iii",l2_control="jjj"},{"ii","jj","i","iii","j","jjj","n"})--CU=3 ---tile_by_index({"j"}, {Tn}, {l1_control="j",l1_tile="jjj"}, {"ii", "jj", "nn","jjj","j","i","n"}) ---tile_by_index({"i"}, {Tii}, {l1_control="iii",l1_tile="i"}, {"ii", "jj", "iii","i","j","n"}) -print_code() -cudaize("kernel_GPU",{atoms=N*4,energy=V*V*1},{block={"jj","ii"}, thread={"j","i"}})--CU=3 ---cudaize("kernel_GPU",{atoms=N*4,energy=V*V*1},{block={"ii","jj"}, thread={"i","j"}})--CU=3 -print_code() -copy_to_shared("tx","atoms",-16) -copy_to_registers("tx","energy") ---copy_to_texture("atoms") ---unroll_to_depth(1) ---unroll(0,9,0) ---unroll(0,5,0) - ---unroll(0,8,256) -print_code() diff --git a/test-chill/test-cases/examples/cuda-chill/cudaize.lua b/test-chill/test-cases/examples/cuda-chill/cudaize.lua deleted file mode 100644 index 7359cca..0000000 --- a/test-chill/test-cases/examples/cuda-chill/cudaize.lua +++ /dev/null @@ -1,1004 +0,0 @@ - --- THIS IS CUDAIZE.LUA - -function table.contains_key(table, key) - for k in pairs(table) do - if k == key then - return true - end - end - return false -end - -function valid_indices(stmt, indices) - --print( "valid_indices() lua calling C cur_indices") - --io.flush() - cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - for idx in pairs(indices) do - if not table.contains_key(cur,idx) then - return false - end - end - return true -end - -function next_clean_level(cur_idxs,level) - --print("next_clean_level( ..., "..level.." )") - --print(string.format("indices_at_each_level %s ",list_to_string(cur_idxs) )) - - --print("loop to "..#cur_idxs) - for i=level+1,#cur_idxs do - --print("Checking level "..i.." = '"..cur_idxs[i].."'") - if (# cur_idxs[i] > 0) then - --print("Good enough"..(# cur_idxs[i])) - --print("returning "..i) - return i - end - end - return -1 --sentinal that there were no non-dummy indices left -end - -function build_order(final_order, tile_idx_names, ctrl_idx_names, tile_idx_map, cur_level) - order = {} - --print("\nbuild_order()") - --print("build_order(): final_order = ( "..list_to_string(final_order).." )") - --print("build_order(): ctrl_idx_names = ("..list_to_string(ctrl_idx_names).." )") - --print("cur_level "..cur_level.."") - --io.flush() - - for i,k in ipairs(final_order) do - skip = false - cur = final_order[i] - --print("\ncur "..cur.." = final_order["..i.."] = "..final_order[i].." ") - --control loops below our current level should not be in the current order - for j=cur_level+2,# ctrl_idx_names do - --print("j "..j.." final_order["..i.."] = "..final_order[i].." ") - if ctrl_idx_names[j] == final_order[i] then - skip = true - --print("SKIP "..final_order[i].." ") - --io.flush() - end - end - --possibly substitute tile indices ifn necessar - if table.contains_key(tile_idx_map,final_order[i]) then - approved_sub = false - sub_string = tile_idx_map[final_order[i]] - for j=cur_level+2,# tile_idx_names do - if tile_idx_names[j] == sub_string then - approved_sub = true - end - end - if approved_sub then - cur = sub_string - end - end - if not skip then - table.insert(order,cur) - end - end - return order -end - -function list_to_string(str_list) - --Helpful debug output - l = "" - for i,str in ipairs(str_list) do - if i > 1 then - l = l .. ", " .. str - else - l = str - end - end - return l -end - - -function find_cur_level(stmt,idx) - --Search cur_indices for a idx at stmt - cur = cur_indices(stmt) - --print(string.format("find_cur_level(stmt %d, idx %s) Cur indices %s", stmt, idx, list_to_string(cur))) - for i,cidx in ipairs(cur) do - if cidx == idx then - --print(string.format("found it at index %d", i)) - return i - end - end - error("Unable to find "..idx.." in current list of indices") -end - - -function chk_cur_level(stmt,idx) - --Search cur_indices for a idx at stmt - cur = cur_indices(stmt) - for i,cidx in ipairs(cur) do - if cidx == idx then - return i - end - end - return -1 -end - - -function find_offset(cur_order, tile, control) - --print("Looking for tile '"..tile.."' and control '"..control.."' in ( "..list_to_string(cur_order)..", )") - idx1 = -1 - idx2 = -1 - for i,cur in ipairs(cur_order) do - if(cur == tile) then - idx1 = i - end - if(cur == control) then - idx2 = i - end - end - if(idx1 < 0) then - error("Unable to find tile " .. tile .. " in current list of indices") - end - if(idx2 < 0) then - error("Unable to find control " .. control .. " in current list of indices") - end - --print("found at level " .. idx2 .. " and " .. idx1) - if(idx2 < idx1) then - return idx2-idx1+1 - else - return idx2-idx1 - end -end - -function tile_by_index(tile_indices, sizes, index_names, final_order, tile_method) - --print "STARTING TILE BY INDEX" - --io.flush() - stmt = 0 --assume stmt 0 - cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - if not valid_indices(stmt,tile_indices) then - error('One of the indices in the first parameter were not '.. - 'found in the current set of indices.') - end - if not tile_method then tile_method = counted end - tile_idx_names = {} - for i,s in ipairs(tile_indices) do tile_idx_names[i]=s end --shallow copy - --print("tile_index_names: ['"..list_to_string(tile_indices).."']") - - --print("index_names: ") - --for k,v in pairs(index_names) do print(k,v) end - - --io.flush() - - ctrl_idx_names = {} - tile_idx_map = {} - for k,v in pairs(index_names) do - valid = false - if(string.sub(k,1,1) == "l") then - if string.sub(k,-8) == "_control" then - i = tonumber(string.sub(k,2,-9)) - if i and i >= 1 and i <= (# tile_indices) then - ctrl_idx_names[i] = v - --print(string.format("Handling control %s for loop level %d",v,i)) - --print("control "..k.." name "..v.." ") - valid = true - end - elseif string.sub(k,-5) == "_tile" then - i = tonumber(string.sub(k,2,-6)) - if i and i >= 1 and i <= (# tile_indices) then - --print(string.format("tile %s -> %s",tile_indices[i], v)) - tile_idx_names[i] = v - tile_idx_map[v] = tile_indices[i] - --print(string.format("tile %s -> %s",tile_indices[i], v)) - valid = true - end - end - end - if not valid then error(string.format("%s is not a proper key for specifying ".. - "tile or control loop indices\n", k)) end - end - - --filter out control indices (and do name substitution of unprocessed tile indices) for a given level - cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, -1) - permute(stmt, cur_order) - - for i,cur_idx in ipairs(tile_indices) do - --print(string.format("i %d cur_idx %s calling build order ********", i-1, cur_idx)) - cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, i-1) - --Find a offset between tile loop and control loop - -- 0 = control loop one level above tile loop - -- -1 = control loop two levels above tile loop - -- > 0 = tile loop above control loop - -- In the last case, we do two extra tile commands to get the control - -- above the tile and then rely on the final permute to handle the - -- rest - level = find_cur_level(stmt,cur_idx) - offset = find_offset(cur_order, tile_idx_names[i], ctrl_idx_names[i]) - --print(string.format("offset %d", offset)) - - if (offset <= 0) then - --print(string.format("[offset<=0]1tile(%d, %d, %d, %d, %s, %s, %s)",stmt, level, sizes[i], level+offset, tile_idx_names[i], ctrl_idx_names[i], tile_method)) - tile(stmt, level, sizes[i], level+offset, tile_idx_names[i], ctrl_idx_names[i], tile_method) - else - --print(string.format("2tile(%d, %d, %d, %d, %s, %s, %s)", stmt, level, sizes[i], level, tile_idx_names[i], ctrl_idx_names[i], tile_method)) - tile(stmt, level, sizes[i], level, tile_idx_names[i], ctrl_idx_names[i], tile_method);--regular level - --flip tile and control loop - --print(string.format("3tile(%d, %d, %d)",stmt, level+1, level+1)) - tile(stmt, level+1, level+1); - --print(string.format("4tile(%d, %d, %d)",stmt, level+1, level)) - tile(stmt, level+1, level); - --print(string.format("\n[offset>0]tile(%d, %d, %d, %d,%s,%s,%s)",stmt, level, sizes[i], level, tile_idx_names[i], ctrl_idx_names[i], tile_method)) - --print_code() - - end - - --Do permutation based on cur_order - --print "permute based on build order calling build_order()" - --print "cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, i-1)" - cur_order = build_order(final_order, tile_indices, ctrl_idx_names, tile_idx_map, i-1) - --print "permute(stmt, cur_order);" - permute(stmt, cur_order); - --print "\nafter permute(), code is:" - --print_code() - end - --print "ENDING TILE BY INDEX" - --print_code() -end - -function normalize_index(index) - stmt = 0 --assume stmt 0cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - l = find_cur_level(stmt, index) - tile(stmt, l, l) - --print(string.format("\n[Normalize]tile(%d, %d, %d)",stmt, l,l)) -end - -function is_in_indices(stmt, idx) - cur = cur_indices(stmt) - for i=0,#cur,1 do - if(cur[i]==idx) then - return true - end - end - return false - -end - - -function copy_to_registers(start_loop, array_name) - - --print("\n\n****** starting copy to registers") - io.flush() - - stmt = 0 --assume stmt 0 - - -- [Malik] first we make sure that tx and ty are consecutive loops in the 2D thread setup, otherwise all levels for subsequent operations are messed up. Start logic. - cur = cur_indices(stmt) - table_Size = table.getn(cur) - - --print(string.format("Cur indices %s,",list_to_string(cur))) - --print(string.format("The table size is %d", table_Size)) - --table.foreach(cur, print) - --print_code() - - level_tx = -1 - level_ty = -1 - if is_in_indices(stmt,"tx") then level_tx = find_cur_level(stmt,"tx") end - if is_in_indices(stmt,"ty") then level_ty = find_cur_level(stmt,"ty") end - --print(string.format("level_tx %d level_ty %d", level_tx, level_ty)) - - ty_lookup_idx = "" - org_level_ty = level_ty - - --if(cur[level_tx+1]~=nil and cur[level_tx+1]~="") then ty_lookup = ty_lookup+1 end - if(cur[level_ty+1]~=nil and cur[level_ty+1]~="") then - --print(string.format("IF cur[%d] = %s", level_ty+1, cur[level_ty+1])) - ty_lookup_idx = cur[level_ty+1] - else - --if cur[level_ty] ~= nil then print(string.format("ELSE ty_lookup_idx = cur[%d] = %s", level_ty, cur[level_ty])) -- TODO - --else print "ELSE (dangerous)" end - ty_lookup_idx = cur[level_ty] -- may assign nil !? - end - --if ty_lookup_idx ~= nil then print(string.format("ty_lookup_idx '%s'", ty_lookup_idx)) -- TODO - --else print "ty_lookup_idx is NIL" - --end - - if level_ty > 0 then - --print(string.format("\ntile3(%d,%d,%d)",stmt,level_ty,level_tx+1)) - tile(stmt,level_ty,level_tx+1) - end - --print_code() - - --print("\ntylookup is %d",ty_lookup) - --exit(0) - -- - cur = cur_indices(stmt) - table_Size = table.getn(cur) - --print(string.format("Cur indices %s,",list_to_string(cur))) - --print("The table size is "..table.getn(cur)) - --table.foreach(cur, print) - - if is_in_indices(stmt,"tx") then level_tx = find_cur_level(stmt,"tx") end - if ty_lookup_idx then - if is_in_indices(stmt,ty_lookup_idx) then level_ty = find_cur_level(stmt,ty_lookup_idx) end - end - - ty_lookup = 1 - idx_flag = -1 - -- find the level of the next valid index after ty+1 - --print(string.format("\nlevel_ty %d", level_ty)) - if level_ty > 0 then - --print(string.format("table_Size %d", table_Size)) - for num= level_ty+ty_lookup,table_Size do - --print(string.format("num=%d cur[num] = '%s'",num, cur[num])) - if(cur[num] ~= "") then - idx_flag = find_cur_level(stmt,cur[num]) - --print (string.format("idx_flag = %d", idx_flag)) - break - end - end - end - - --print(string.format("\n(first) I am checking all indexes after ty+1 %s",idx_flag)) - --print_code() - --print "" - - how_many_levels = 1 - startat = idx_flag + 1 - if startat == 0 then startat = 1 end -- avoid attempt to examine an illegal array offset - --print(string.format("idx_flag = %d I will check levels starting with %d", idx_flag, idx_flag+1)) - - for ch_lev = startat,table_Size,1 do -- was for ch_lev = idx_flag+1,table_Size,1 do - --print(string.format("ch_lev %d", ch_lev)) - if(cur[ch_lev] ~= nil and cur[ch_lev] ~= "") then - --print(string.format("cur[%d] = '%s'", ch_lev, cur[ch_lev])) - how_many_levels = how_many_levels+1 - end - end - --print("\nHow Many Levels",how_many_levels) - - -- change this all to reflect the real logic which is to normalize all loops inside the thread loops. - if(how_many_levels <2) then - while( idx_flag >= 0) do - for num = level_ty+ty_lookup,(table_Size) do - --print(string.format("at top of loop, num is %d", num)) - --print(string.format("num %d", num)) - --print(string.format("cur[num] = '%s'", cur[num])) - if(cur[num] ~= "") then - idx=cur[num] - --print(string.format("idx '%s'", idx)) - - curlev = find_cur_level(stmt,idx) - --print(string.format("curlev %d", curlev)) - - --print_code() - --print(string.format("\n[COPYTOREG]tile(%d,%d,%d)",stmt,find_cur_level(stmt,idx),level_tx)) - tile(stmt,find_cur_level(stmt,idx),find_cur_level(stmt,idx)) - curlev = find_cur_level(stmt,idx) - --print(string.format("curlev %d", curlev)) - tile(stmt,find_cur_level(stmt,idx),level_tx) - --print(string.format("hehe '%s'",cur[num])) - - cur = cur_indices(stmt) - --print("Cur indices INSIDE"..list_to_string(cur)) - table_Size = table.getn(cur) - --print(string.format("Table Size is: %d",table_Size)) - level_tx = find_cur_level(stmt,"tx") - --print(string.format("\n level TX is: %d",level_tx)) - level_ty = find_cur_level(stmt,ty_lookup_idx) - --print(string.format("\n level TY is: %d",level_ty)) - idx_flag = -1 - --print "idx_flag = -1" - - -- find the level of the next valid index after ty+1 - - -- the following was num, which conflicts with loop we're already in, and otherwise wasn't used (?) - for num= level_ty+ty_lookup,table_Size do - --print(string.format("num mucking num = %d", num)) - if(cur[num] ~= nil and cur[num] ~= "") then - idx_flag = find_cur_level(stmt,cur[num]) - --print("\n(second) I am checking all indexes after ty+1 %s",cur[num]) - break - end - end - --print(string.format("num mucked to %d idx_flag = %d", num, idx_flag)) - - end - --print(string.format("at bottom of loop, num is %d", num)) - end - end - end - --print "done with levels" - - - - - --print "ARE WE SYNCED HERE?" - --print_code() - --print("\ntile(%d,%d,%d)",stmt,level_k,level_k) - --tile(stmt,level_k,level_k) - - -- [Malik] end logic - --print_code() - start_level = find_cur_level(stmt, start_loop) - --We should hold contant any block or tile loop - block_idxs = block_indices() - thread_idxs = thread_indices() - --print("\nblock indices are") - --table.foreach(block_idxs, print) - --print("\nthread indices are") - --table.foreach(thread_idxs, print) - --print(string.format("\nStart Level: %d",start_level)) - - hold_constant = {} - --print("\n Now in Blocks") - for i,idx in ipairs(block_idxs) do - --print(string.format("\n Idx:%s : Level: %d",idx,find_cur_level(stmt,idx))) - if find_cur_level(stmt,idx) >= start_level then - table.insert(hold_constant, idx) - --print(string.format("\nJust inserted block %s in hold_constant",idx)) - end - end - - - --print("\n Now in Threads") - for i,idx in ipairs(thread_idxs) do - --print(string.format("\n Idx:%s : Level: %d",idx,find_cur_level(stmt,idx))) - if find_cur_level(stmt,idx) >= start_level then - table.insert(hold_constant, idx) - --print(string.format("\nJust inserted thread %s in hold_constant",idx)) - end - end - - --print "\nhold constant table is: " - --table.foreach(hold_constant, print) - - --print("\nbefore datacopy pvt") - old_num_stmts = num_statements() - --print_code() - --print(string.format("\n[DataCopy]datacopy_privatized(%d, %s, %s, vector having privatized levels)",stmt, start_loop, array_name)) - --table.foreach(hold_constant, print) - datacopy_privatized(stmt, start_loop, array_name, hold_constant) - - --print(hold_constant) - new_num_stmts = num_statements() - --print("\nthe num of statements:%d\n",new_num_stmt) - --print_code() - --exit(0) - -- [Malik] normalize the copy loops created. - cur = cur_indices(old_num_stmts) - --print("Cur indices "..list_to_string(cur)) - for cidx,i in ipairs(cur) do - if i ~= "tx" and i~="ty" and i~="bx" and i~="by" then - --tile(old_num_stmts,find_cur_level(old_num_stmts,i),find_cur_level(old_num_stmts,i)) - --print("\nTILE OF REG: tile(%d,%d,%d)",old_num_stmts,find_cur_level(old_num_stmts,i),find_cur_level(old_num_stmts,i)) - end - end - --print_code() - --print("\nthe num of statements OLD+1 :",(old_num_stmts+1)) - - ---[[ - is this commented out? why yes, yes it is block comment - if( (old_num_stmts+1) <= new_num_stmts) then - cur = cur_indices(old_num_stmts+1) - --print("Cur indices+1 "..list_to_string(cur)) - for cidx,i in ipairs(cur) do - if i ~= "tx" and i~="ty" and i~="bx" and i~="by" then - tile(old_num_stmts+1,find_cur_level(old_num_stmts+1,i),find_cur_level(old_num_stmts+1,i)) - --print("\nTILE OF REG: tile(%d,%d,%d)",old_num_stmts+1,find_cur_level(old_num_stmts+1,i),find_cur_level(old_num_stmts+1,i)) - end - end - end ---]] - - - --Unroll to the last thread level - --for stmt=old_num_stmts,new_num_stmts-1 do - -- level = find_cur_level(stmt,thread_idxs[#thread_idxs])--get last thread level - --if level < #cur_indices(stmt) then - -- unroll(stmt,level+1,0) - --print(string.format("\n[Unroll]unroll(%d, %d, 0)",stmt, level+1)) - ----print_code() - --end - --end - io.flush() - --print("****** ending copy to registers\n\n") - --io.flush() -end - -function copy_to_shared(start_loop, array_name, alignment) - --print(string.format("\nstarting copy to shared(%s, %s, %d )",start_loop,array_name,alignment)) - stmt = 0 --assume stmt 0 - cur = cur_indices(stmt) - --print("Cur indices "..list_to_string(cur)) - - start_level = find_cur_level(stmt, start_loop) - --print(string.format("start_level %d", start_level)) - - old_num_stmts = num_statements() - --print(string.format("old_num_statements %d", old_num_stmts)) - - --Now, we give it indices for up to two dimentions for copy loop - copy_loop_idxs = {"tmp1","tmp2"} - --print(string.format("\n[DataCopy]datacopy(%d, %d, %s, {\"tmp1\",\"tmp2\"},false,0,1,%d,true)",stmt, start_level, array_name, alignment)) - datacopy(stmt, start_level, array_name, copy_loop_idxs, false, 0, 1, alignment,true) - - add_sync(stmt,start_loop) - new_num_stmts = num_statements() - - --This is fairly CUBLAS2 specific, not sure how well it generalizes, - --but for a 2D copy, what we want to do is "normalize" the first loop - --"tmp1" then get its hard upper bound. We then want to tile it to - --make the control loop of that tile "ty". We then tile "tmp2" with a - --size of 1 and make it "tx". - --print(string.format("fairly CUBLAS2 specific, OLD %d NEW %d", old_num_stmts, new_num_stmts )) - - for stmt=old_num_stmts,new_num_stmts-1 do - --print(string.format("for stmt = %d", stmt)) - was_no_error, level = pcall(find_cur_level, stmt, "tmp2") - - if was_no_error then - --print_code() - --print("\nCopy to shared: [If was no error]\n") - find_cur_level(stmt,"tmp2") - tile(stmt, level, level) - - lower,upper = hard_loop_bounds(stmt, level) - upper = upper + 1 - --print(string.format("lower %d upper %d", lower, upper)) - - tx,ty = thread_dims() - --print("2-loop cleanup: lower, upper: "..lower..", "..upper..", tx: "..tx) - - level = find_cur_level(stmt,"tmp1") - --print(string.format("level %d", level)) - - if tx == upper and ty == 1 then - --print(string.format("tx = %d upper = %d ty = %d", tx, upper, ty)) - --print "Don't need" - - --Don't need an extra tile level, just move this loop up - second_level = find_cur_level(stmt,"tmp2") - --print(string.format("\n[Tile0]tile(%d, %d, 1, %d,%s,%s,counted)",stmt, second_level, level, "tx", "tx")) - tile(stmt, second_level, 1, level, "tx", "tx", counted) - else - --print "DO need?" - --print_code() - if(ty == 1) then new_ctrl = "tmp3" else new_ctrl = "ty" end - - ---[[ Commenting out a block of Gabe's code in this control flow - -- level = find_cur_level(stmt,"tmp1") - tile(stmt, level, level) - - lower,upper = hard_loop_bounds(stmt, level) - upper = upper + 1 - --print_code() - --print("2-loop cleanup: lower, upper: "..lower..", "..upper..", tx: "..tx..", level: "..level) - if(math.ceil(upper/ty) > 1)then - tile(stmt, level, math.ceil(upper/ty), level, "tmp", new_ctrl, counted) - --print(string.format("\n[Tile1]tile(%d, %d, %f[%d,%d], %d,%s,%s,counted)",stmt, level, math.ceil(upper/ty),upper,ty, level, "tmp", new_ctrl)) - else - tile(stmt, level, math.ceil(upper/ty), level, "ty", new_ctrl, counted) - --print(string.format("\n[Tile1]tile(%d, %d, %f[%d,%d], %d,%s,%s,counted)",stmt, level, math.ceil(upper/ty),upper,ty, level, "tx", new_ctrl)) - end - - --print_code() - -- [Malik] If here we have the loop upper bound > tx, then we should tile once more after the next tile, to carve out the correct tx. - lower1,upper1 = hard_loop_bounds(stmt,level) - level1 = level - stmt1 = stmt - -- [Malik] Do the tile after the second level tile with if condition. Just to keep the original order, the tile is being pushed to the end. - - --print("[Malik]-loop cleanup: lower1, upper1: "..lower1..", "..upper1..", tx: "..tx..", level:"..level1) - - --print_code() - --level = find_cur_level(stmt,"tmp") - --tile(stmt,level,level) - --print_code() - - --[Malik] if you are moving the loop above the level1, you need to update level1 with new position which would be level1+2 or second_level - if(level <= level1) then level1 = level1+2 end - --print(string.format("\n[Tile2]tile(%d, %d, 1, %d,%s,%s,counted)",stmt, second_level, level, "tx", "tx")) - --print("\n----------------------------------") - --print_code() - --print("\n**********************************") - --print("[Malik]-loop cleanup: lower1, upper1: "..lower1..", "..upper1..", tx: "..tx..", level:"..level1) - -- [Malik] If the upper bound > tx, we do another tile to carve out the correct tx from a bigger loop. Else just normalize the bounds. - if( upper1 > ty) then - third_level = find_cur_level(stmt1,"tmp") - --print("\n\n\n\t\t\t\tthirdlevel:"..third_level) - tile(stmt1, third_level, ty, third_level, "ty", "tmp", counted) - --print(string.format("\n[Tile3]tile(%d, %d, %d,%d,%s,%s,counted)",stmt1, third_level, ty,third_level, "ty", "tmp")) - tile(stmt1,third_level+1,third_level+1) - --print(string.format("\n[Tile3]tile(%d, %d, %d)",stmt1, third_level+1, third_level+1)) - tile(stmt1,third_level+1,third_level) - --print(string.format("\n[Tile3]tile(%d, %d, %d)",stmt1, third_level+1, third_level)) - else - tile(stmt1,level1,level1) - --print(string.format("\n[Tile3ELSE]tile(%d, %d, %d)",stmt1,level1,level1)) - end - - --print("\nStarting tmp2\n");--print_code(); - second_level = find_cur_level(stmt,"tmp2") - lower,upper = hard_loop_bounds(stmt,second_level) - level = second_level - --print("[Malik]-loop cleanup@tmp2: lower, upper: "..lower..", "..upper..", tx: "..tx..", level:"..level) - - if(math.ceil(upper/tx) > 1)then - tile(stmt, second_level,math.ceil(upper/tx), level, "tmp", "tx", counted) - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, second_level,math.ceil(upper/tx),second_level, "tmp", "tx")) - else - tile(stmt, second_level,math.ceil(upper/tx), level, "tx", "tx", counted) - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, second_level,math.ceil(upper/tx),second_level, "tx", "tx")) - end - --print_code() - lower2,upper2 = hard_loop_bounds(stmt,level) - level2 = level - stmt2 = stmt - --print("[Malik]-loop cleanup@tmp2: lower2, upper2: "..lower2..", "..upper2..", tx: "..tx..", level:"..level2) - -- now for the second level. - if( upper2 > tx) then - forth_level = find_cur_level(stmt2,"tmp") - --print("\n\n\n\t\t\t\tforthlevel:"..forth_level) - --print_code() - tile(stmt2, forth_level, 1, forth_level, "tx", "tmp", counted) - --print(string.format("\n[Tile3B]tile(%d, %d, %d,%d,%s,%s,counted)",stmt2, forth_level, tx,forth_level, "ty", "tmp")) - --print_code() - --tile(stmt2,forth_level+1,forth_level+1) - --print(string.format("\n[Tile3B]tile(%d, %d, %d)",stmt2, forth_level+1, forth_level+1)) - --tile(stmt2,forth_level+1,forth_level) - --print(string.format("\n[Tile3B]tile(%d, %d, %d)",stmt2, forth_level+1, forth_level)) - else - new_level = find_cur_level(stmt2,"ty") - tile(stmt2,level2,1,new_level,"tx","tx",counted) - --print(string.format("\n[Tile3BELSE]tile(%d, %d, %d)",stmt2,level2,level2)) - tmp_level = find_cur_level(stmt2,"tmp") - tile(stmt2,tmp_level,tmp_level) - end - - --print_code() - --print("\n----------------------------------") ---]] - - --print_code() - --print("\nStarting tmp2\n");--print_code(); - first_level = find_cur_level(stmt,"tmp1") - second_level = find_cur_level(stmt,"tmp2") - lower,upper = hard_loop_bounds(stmt,second_level) - - --print("[Malik]-loop cleanup@tmp2: lower, upper: "..lower..", "..upper..", tx: "..tx..",first level:"..first_level..",second_level:"..second_level) - - -- Move the fastest changing dimension loop to the outermost,identified by "tmp2" and to be identified as tx. - --print(string.format("\n[fastest]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, second_level,1,first_level, "tx", "tx")) - tile(stmt,second_level,1,first_level,"tx","tx",counted) - --print_code() - - first_level = find_cur_level(stmt,"tmp1") - lower_1,upper_1 = hard_loop_bounds(stmt,first_level) - tx_level = find_cur_level(stmt,"tx") - lower_tx,upper_tx = hard_loop_bounds(stmt,tx_level) - --print(string.format("UL_1 %d %d UL_tx %d %d", lower_1, upper_1, lower_tx, upper_tx)) - - if(math.ceil(upper_tx/tx) > 1)then - --print "ceil I say" - --print(string.format("\n[Tile1]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, tx_level,tx,tx_level, "tx", "tmp1")) - tile(stmt,tx_level,tx,tx_level,"tx","tmp_tx",counted) - --print_code() - - peat = find_cur_level(stmt,"tx") - --print(string.format("\n[Tile1]tile(%d, %d, %d)",stmt, peat, peat)) - tile(stmt, peat, peat ) --find_cur_level(stmt,"tx"),find_cur_level(stmt,"tx")) - --print_code() - - if (find_cur_level(stmt,"tx")>find_cur_level(stmt,"tmp_tx")) then - --print(string.format("\nagain [Tile1]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx"))) - tile(stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx")) - --print_code() - end - --else - --tile(stmt, tx_level,1, tx_level, "tx", "tx", counted) - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, tx_level,1,tx_level, "tx", "tx")) - end - --print_code() - --]] -- this apparently is NOT the end of a block comment - - --print("\nStarting tmp1\n") - -- Handle the other slower changing dimension, the original outermost loop, now identified by "tmp1", to be identified as "ty". - tile(stmt,find_cur_level(stmt,"tmp1"),find_cur_level(stmt,"tmp1")) - --print_code() - - ty_level = find_cur_level(stmt,"tmp1") - lower_ty,upper_ty = hard_loop_bounds(stmt,ty_level) - - tx_level = find_cur_level(stmt,"tx") - lower_tx,upper_tx = hard_loop_bounds(stmt,tx_level) - --print("[Malik]-loop cleanup@tmp1: lowerty, upperty: "..lower_ty..", "..upper_ty..", ty: "..ty..",ty level:"..ty_level..",tx_level:"..tx_level..", stmt: "..stmt) - - --print "before ceil" - if(math.ceil(upper_ty/ty) > 1)then - --print "CEIL IF" - --print("\n Inside upper_ty/ty > 1\n"); - - --print(string.format("\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, ty_level,ty,ty_level, "ty", "tmp_ty")) - tile(stmt,ty_level,ty,ty_level,"ty","tmp_ty",counted) - --print_code() - - --print(string.format("\n[Tile2-1]tile(%d, %d, %d)",stmt,find_cur_level(stmt ,"ty"),find_cur_level(stmt,"ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"ty")) - --print_code() - - ----------------------------------------------------------------------- - ---------------------------------------------------------------------- - cur_idxs = cur_indices(stmt) - --print("\n cur indexes are "..list_to_string(cur_idxs)) - - -- Putting ty before any tmp_tx - idx_flag = -1 - for num= 0,table.getn(cur_idxs) do - if(cur[num] == "tmp_tx") then - idx_flag = find_cur_level(stmt,cur[num]) - break - end - end - --print(string.format("\n (1) so i have found out the value of idx flag as %d",idx_flag) ) - - if(idx_flag >=0 ) then - if (find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty")) then - --print(string.format("\n[Tile2-2]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - --print_code() - end - end - - -- Now Putting ty before any tmp_ty - idx_flag = -1 - for num= 0,table.getn(cur_idxs) do - if(cur[num] == "tmp_ty") then - idx_flag = find_cur_level(stmt,cur[num]) - break - end - end - --print(string.format("\n IF so i have found out the value of idx flag as %d",idx_flag) ) - if(idx_flag >=0 ) then - --print "one more test" - if ((find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty"))) then - --print(string.format("\n[Tile2-2]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - --print_code() - end - end - else - --print "CEIL ELSE" - --cur_idxs = cur_indices(stmt) - --print("\n Inside upper_ty/ty <= 1\n"); - - --print(string.format("\n[Tile3]tile(%d, %d, %d,%d,%s,%s,counted)",stmt, ty_level,1,ty_level, "ty", "ty")) - tile(stmt, ty_level,1, ty_level, "ty", "ty", counted) - --print_code() - - --print(string.format("\n[Tile3-1]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1)) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1) - --print_code() - - idx_flag = -1 - if(cur_idxs) then - --print "CAN NEVER GET HERE? cur_idxs" - for num= 0,table.getn(cur_idxs) do - if(cur[num] == "tmp_ty") then - idx_flag = find_cur_level(stmt,cur[num]) - break - end - end - end - --print(string.format("\n ELSE so i have found out the value of idx flag as %d",idx_flag) ) - if(idx_flag >=0 ) then - if (find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty")) then - --print(string.format("tile( stmt %d, level ty %d, level ty %d",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - tile(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - --print(string.format("\n[Tile3-2]tile(%d, %d, %d)",stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty"))) - end - end - end - - --print_code() - end - - - --print "\n\n *** at bottom of if in copy to shared, " - --print_code() - --print "end of if" - - else - --copy to shared only created one level, not two, so we use a different approach (MV & TMV) - --print("\nCopy to shared: [If was error]\n") - level = find_cur_level(stmt,"tmp1") - tile(stmt, level, level) - - --print(string.format("\n[Tile]tile(%d, %d, %d)",stmt, level, level)) - tx,ty = thread_dims() - lower,upper = hard_loop_bounds(stmt, level) - upper = upper+1 --upper bound given as <=, compare to dimensions tx which is < - --print("upper "..upper.." tx "..tx) - if upper == tx then - rename_index(stmt, "tmp1", "tx") - else - --print("upper is not tx") - --TODO: Don't know, maybe do some tileing etc - --print_code() - --print("upper "..upper.." tx "..tx.." stmt: "..stmt.." level: "..level) - tile(stmt, level,tx,level, "tx", "tmp_tx", counted) - --print_code() - - --print("stmt:"..stmt.." level+1: "..level+1) - --print("TILE 7") - tile(stmt, level+1,1,level+1,"tx", "tx",counted) - --print("TILE 3") - tile(stmt,level+1,level) - --print_code() - - if(ty > 1) then - --print_code() - --print("GOING IN") - lower,upper = hard_loop_bounds(stmt, level+1) - --print(string.format("ty %d lower %d upper %d", ty, lower, upper)) - --upper=125 - --print("NOW FOR Y: upper "..upper.." ty "..ty.." stmt: "..stmt.." level: "..(level+1).." bound:"..math.ceil(upper/ty)) - tile(stmt, level+1,math.ceil(upper/ty),level+1, "tmp_ty", "ty", counted) - --tile(stmt, level+2,math.ceil(upper/ty),level+2, "tmp_ty", "ty", counted) - end - --print_code() - --rename_index(stmt, "tmp1", "tx") - --print("Warning: Need to implement some logic here to tile the single level shared copy loop to match thread dimensions") - end - end - --Always add sync - add_sync(stmt,start_loop) - - end - --print("ending copy to shared\n") - --print_code() -end - -function unroll_to_depth(max_depth) - --print(string.format("\n\nunroll_to_depth(%d)", max_depth )) - --print "SYNC UP" - - cur = cur_indices(0) - thread_idxs = thread_indices() - guard_idx = thread_idxs[#thread_idxs] - - --print(string.format("cur indices %s",list_to_string(cur))) - --print(string.format("thread indices %s",list_to_string(thread_idxs))) - --print(string.format("#thread_idxs = %d", #thread_idxs)) - --print(string.format("guard_idx = %s", guard_idx)) - - ---- HERE FIND OUT THE LOOPS WHICH ARE COMMON BETWEEN STATEMENTS - common_loops = {} - comm_loops_cnt = 0 - num_stmts = num_statements() - --print(string.format("num statements %d", num_stmts)) - - for stmt=0,num_stmts-1 do - cur_idxs = cur_indices(stmt) - - --print(string.format("\nSTMT %d Current Indices: %s",stmt,list_to_string(cur_idxs))) - - if(chk_cur_level(stmt,"tx")>0) then - for ii=1,find_cur_level(stmt,"tx")-1 do -- started at 0 - --print(string.format("ii = %d", ii)) -- index starts at 1, what does index 0 do? - --if cur_idxs[ii] == nil then print "cur_idxs[i]] is NIL" - --else print(string.format("cur_idxs[%d] = '%s'", ii, cur_idxs[ii])) -- index starts at 1, what does index 0 do? - --end - - if(cur_idxs[ii] ~= "bx" and cur_idxs[ii] ~= "by" and cur_idxs[ii] ~= nil and cur_idxs[ii] ~= "tx" and cur_idxs[ii] ~= "ty" and cur_idxs[ii] ~= "") then - - --print(string.format("id %s is not in the list", cur_idxs[ii] )) - - for stmt1=stmt+1,num_stmts-1 do - --print(string.format("\nii %d stmt1 is %d", ii, stmt1)) - cur_idxs1 = cur_indices(stmt1) - --print("\nstmt1 cur_idxs1 is "..list_to_string(cur_idxs1)) - - --print(string.format("cur level(%d, %s) = %d", stmt, "tx", find_cur_level(stmt,"tx"))) - - endrange = find_cur_level(stmt,"tx")-1 - --print(string.format("for iii=1, %d do", endrange)) - - for iii=1,find_cur_level(stmt,"tx")-1 do -- started at 0 - --print(string.format("stmt %d ii %d iii %d ", stmt, ii, iii)) - --if(cur_idxs1[iii] ~= nil) then - -- print(string.format("stmt %d ii %d iii %d cur_idxs1[%d] = '%s'", stmt, ii, iii, iii, cur_idxs1[iii])) - --else - -- print(string.format("stmt %d ii %d iii %d cur_idxs1[%d] = NIL", stmt, ii, iii, iii)) - --end - - if(cur_idxs1[iii] ~= "bx" and cur_idxs1[iii] ~= "by" and cur_idxs1[iii] ~= nil and cur_idxs1[iii] ~= "tx" and cur_idxs1[iii] ~= "ty" and cur_idxs1[iii] ~= "") then - if(cur_idxs[ii] == cur_idxs1[iii]) then - --print("\nfound idx:"..cur_idxs[ii]) - --if(comm_loops_cnt == 0) then print "\n\n*** WARNING *** assigning to array index ZERO in Lua" end - common_loops[comm_loops_cnt] = cur_idxs[ii] - --print(string.format("cl[%d] = '%s'", comm_loops_cnt, common_loops[comm_loops_cnt])) - comm_loops_cnt = comm_loops_cnt + 1 - end - end - end - end - end - end - end - end - ---- - --if(comm_loops_cnt>0) then - -- print("\n COMM LOOPS :TOTAL "..comm_loops_cnt..", and are "..list_to_string(common_loops).." this loop :"..common_loops[0]) - --else - -- print "UNROLL can't unroll any loops?" - --end - - - - - repeat - old_num_stmts = num_statements() - --print(string.format("old_num_statements %d", old_num_stmts)) - - for stmt=0,old_num_stmts-1 do - cur_idxs = cur_indices(stmt) - --print(string.format("stmt %d cur_idxs = %s", stmt, list_to_string(cur_idxs))) - if(#cur_idxs > 0) then - gaurd_level = -1 - if(chk_cur_level(stmt,guard_idx)>0) then - gaurd_level = find_cur_level(stmt,guard_idx) - end - --print(string.format("guard_level(sp) = %d", gaurd_level)) - - if(gaurd_level>-1) then - level = next_clean_level(cur_idxs,gaurd_level) - --print(string.format("next clean level %d", level)) - - --need to handle max_depth - num_unrolled = 0 - level_unroll_comm = level - level_arr = {} - while level >= 0 do - --print(string.format("while: level = %d", level)) - - if num_unrolled == max_depth then break end - --print("Unrolling "..stmt.." at level "..(level).." index ".. cur_idxs[gaurd_level+1]) - - level_arr[num_unrolled] = level - num_unrolled = num_unrolled + 1 - - guard_level = find_cur_level(stmt,guard_idx) - level = next_clean_level(cur_idxs,level+1) - end - --dies print("How many levels for unroll commands"..table.getn(level_arr).." which is "..level_arr[0].." and "..level_arr[#level_arr]) - --if(table.getn(level_arr) ~= nil) then - - --print "OK, NOW WE UNROLL" - - if(level_unroll_comm >= 0)then - for i = table.getn(level_arr),0,-1 do - --print(string.format("\ni=%d", i)) - --print(string.format("[Unroll]unroll(%d, %d, 0)",stmt, level_arr[i])) - - unroll(stmt,level_arr[i],0) - --print("finished unroll]]\n") - --print_code() - end - end ------- - end ---[[ - -THERE WAS A BIG BLOCK OF COMMENTED OUT CODE HERE - - ---]] ------- - end - end - new_num_stmts = num_statements() - - until old_num_stmts == new_num_stmts - -end - - diff --git a/test-chill/test-cases/examples/cuda-chill/cudaize.py b/test-chill/test-cases/examples/cuda-chill/cudaize.py deleted file mode 100755 index ffef009..0000000 --- a/test-chill/test-cases/examples/cuda-chill/cudaize.py +++ /dev/null @@ -1,1047 +0,0 @@ -#! /usr/bin/python - -# THIS IS CUDAIZE.PY - -import chill -import sys -import math - -strided = 0 -counted = 1 - -def print_code(): - chill.print_code() - print "" - sys.stdout.flush() - - -def table_contains_key( table, key ): # use a dict for the 'table'? - return table.has_key(key) # (key in table)? - -def print_array( arr ): # a useful function to mimic lua output - for a in arr[:-1]: - print "%s," % a, - print "%s" % arr[-1] - sys.stdout.flush() - -def valid_indices( statement, indices ): - #print "valid_indices() python calling C cur_indices" - #print statement - cur = chill.cur_indices(statement) # calls C - #print "python valid_indices(), cur = ", - #print cur - #print "indices = ", - #print indices - - for index in indices: - if not index in cur: - return False - return True - -def next_clean_level( indices_at_each_level, level): - #print "next_clean_level( ..., %d )" % level - #print "indices_at_each_level ", - print_array( indices_at_each_level ) - - numlevels = len(indices_at_each_level) - #print "loop to %d" % numlevels - for i in range(level+1, numlevels+1): - pythoni = i-1 # LUA index starts at 1 - #print "Checking level %d = '%s'" % (i, indices_at_each_level[pythoni]) - sys.stdout.flush() - if len(indices_at_each_level[pythoni]) > 0: # LUA INDEX STARTS AT 1 - #print "returning %d" % i - return i # MATCH lua return value, LUA index starts at one - return -1 # no non-dummy indices - - - - -def build_order( final_order, tile_index_names, control_index_names, tile_index_map, current_level): - order = [] - #print "\nbuild_order()" - #print "build_order(): final_order = (", - count = 0 - for f in final_order: - #if count+1 == len(final_order): - # print "%s )" % f - #else: - # print "%s," % f , - count += 1 - - keys = control_index_names.keys() - keys.sort() - #if (2 == len(keys)): - # print "build_order(): ctrl_idx_names = (%s, %s)" % (control_index_names[0], control_index_names[1]) - #else: - # print "build_order(): ctrl_idx_names = (%s" % control_index_names[0], - # for k in keys[1:]: - # print ", %s" % control_index_names[k], - # print ")" - - #print control_index_names - #print "cur_level %d" % current_level - - #print "tile index map: ", - #print tile_index_map - - - for i in range(len(final_order)): - k = final_order[i] # not used? - skip = False - cur = final_order[i] - # control loops below our current level should not be in the current order - - # skip = cur in control_index_names[current_level+2:] - #print "\n%d control_index_names, " % len(control_index_names) - #print control_index_names - - for j in range(current_level+1, len(control_index_names)): - #print "comparing cur %s with cin[%d] %s" % ( cur, j, control_index_names[j]) - if control_index_names[j] == cur: - skip = True - #print "SKIP %s " % cur - - # possibly substitute tile indices if necessary - if tile_index_map.has_key(cur): - approved_sub = False - sub_string = tile_index_map[cur] - #print "sub_string = ", - #print sub_string - - # approved_sub = sub_string in tile_index_names[current_level+2:] - for j in range(current_level+1, len(tile_index_names)): - if tile_index_names[j] == sub_string: - approved_sub = True - if approved_sub: - cur = sub_string - - if not skip: - order.append( cur) - #print "build_order() returning order (", - #print order - #for o in order: - # print "%s," % o, - #print ")" - return order - -def find_cur_level( stmt, idx ): - #print "find_cur_level(stmt %d, idx %s) Cur indices" % ( stmt, idx ), - - cur = chill.cur_indices(stmt) - #for c in cur[:-1]: - # print "%s," % c, - #print "%s" % cur[ -1 ] - - index = 1 # lua starts indices at 1 !! - for c in cur: - if c == idx: - #print "found it at index %d" % index - #sys.stdout.flush() - #print "in find_cur_level, returning ", - #print index - return index - index += 1 - #print "find_cur_level(), Unable to find index %s in" % idx, - #print cur - #print "in find_cur_level, returning -1" - return -1 # special meaning "it's not there" - -def chk_cur_level( stmt, idx ): - # search cur_indices for a ind at stmt - cur = chill.cur_indices(stmt) - if idx in cur: - return 1 + cur.index(idx) # lua index starts at 1 ! - return -1 - -def find_offset( cur_order, tile, control): - #print "Looking for tile '%s' and control '%s' in (" % (tile, control), - #print cur_order - #for o in cur_order: - # print "%s," % o, - #print ")" - - idx1 = -1 - idx2 = -1 - if tile in cur_order: - idx1 = 1 + cur_order.index(tile) # lua indexes from 1! - else: - print "find_offset(), unable to find tile %s in current list of indices" % tile - sys.exit(-1) - - if control in cur_order: - idx2 = 1 + cur_order.index(control) # lua indexes from 1! - else: - print "find_offset(), unable to find control %s in current list of indices" % control - sys.exit(-1) - - #print "found at level %d and %d" % ( idx2, idx1 ) - # this appears horrible - if idx2 < idx1: - return idx2-idx1+1 # bad ordering - else: - return idx2-idx1 - - - -def tile_by_index( tile_indices, sizes, index_names, final_order, tile_method): - #print "STARTING TILE BY INDEX" - #print "tile_by_index() tile_method ", - #print tile_method - #print "index_names: ", - #print index_names - - stmt = 0 # assume statement 0 - if not valid_indices( stmt, tile_indices): - print "python tile_by_index() one or more of ", - print tile_indices, - print " is not valid" - sys.exit(-1) - - if tile_method == None: - #print "CREATING tile_method = 1" - tile_method = 1 # "counted" - - tile_index_names = [] - for ti in tile_indices: - tile_index_names.append( ti ) # make a copy? - #print "tile_index_names:", - #print tile_index_names - - control_index_names = {} # a dictionary? - tile_index_map = {} - - #print "index_names: " - #print index_names - - for pair in index_names: - valid = False - control = pair[0] - name = pair[1] - #print "control %s name %s" % ( control, name ) - - if control[0] == "l" and control[1].isdigit(): - if control.endswith("_control"): - index = int(control[1: -8]) - control_index_names[index-1] = name - valid = True - - elif control.endswith("_tile"): - index = int(control[1: -5]) - #print "index %d" % index - tile_index_names[index-1] = name # ?? - tile_index_map[name] = tile_indices[index-1] - valid = True - if not valid: - print "%s is not a proper key for specifying tile or control loop indices\n" % control - - #print "control_index_names = ", - #print control_index_names - - #print "tile_index_names = ", - #print tile_index_names - - #print "before call to build_order(), tile_index_map = ", - #print tile_index_map - - - # filter out control indices (and do name substitution of unprocessed tile indices) for a given level - cur_order = build_order(final_order, tile_indices, control_index_names, tile_index_map, -1) - - #print "returned from build_order python\n\n" - - # print("permute("..stmt..", {"..list_to_string(cur_order).."})") - #print "permute(%d, {" % stmt, - #print "cur_order = ", - #print cur_order, - #print "})" - - cur_order.insert(0, stmt) - #print cur_order - chill.permute( tuple( cur_order)) - #print "in cudaize.py, returned from C code chill.permute()\n" - - for i in range(len(tile_indices)): - cur_idx = tile_indices[i] - #print "i %d cur_idx %s calling build order ********" % (i, cur_idx) - cur_order = build_order( final_order, tile_indices, control_index_names, tile_index_map, i) - #print "cur_idx %s return from build order" % cur_idx - - # Find an offset between tile loop and control loop - # 0 = control loop one level above tile loop - # -1 = control loop two levels above tile loop - # > 0 = tile loop above control loop - # In the last case, we do two extra tile commands to get the control - # above the tile and then rely on the final permute to handle the - # rest - level = find_cur_level(stmt,cur_idx) - #print "level %d\n" % level - - offset = find_offset(cur_order, tile_index_names[i], control_index_names[i]) - #print "offset %d" % offset - - if offset <= 0: - #print "[offset<=0]1tile(%d, %d, %d, %d, %s, %s, %d)" % (stmt, level, sizes[i], level+offset, tile_index_names[i], control_index_names[i], tile_method ) - chill.tile7( stmt, level, sizes[i], level+offset, tile_index_names[i], control_index_names[i], tile_method ) - #print "in cudaize.py, returned from C code chill.tile7\n" - - else: - #print "2tile(%d, %d, %d, %d, %s, %s, %d)" % (stmt, level, sizes[i], level+offset-1, tile_index_names[i], control_index_names[i], tile_method ) - chill.tile7( stmt, level, sizes[i], level+offset-1, tile_index_names[i], control_index_names[i], tile_method ) # regular level - - # flip and tile control loop - #print "3tile(%d, %d, %d)" % ( stmt, level+1, level+1) - chill.tile3( stmt, level+1, level+1) - - #print "4tile(%d, %d, %d)" % ( stmt, level+1, level) - chill.tile3( stmt, level+1, level) - - #print_code() - - # Do permutation based on cur_order - #print("permute based on build order calling build_order()") - cur_order = build_order(final_order, tile_indices, control_index_names, tile_index_map, i) - - #print("permute based on build order return from build_order()") - - # print("permute("..stmt..", {"..list_to_string(cur_order).."})") - topermute = cur_order - topermute.insert(0, stmt) - chill.permute( tuple(topermute) ) - #print "\nafter permute(), code is:" - #print_code() - -def normalize_index( index ): - #print "in cudaize.py, normalize_index( %s )" % index - stmt = 0 # assume stmt 0 - l = find_cur_level( stmt, index ) - chill.tile3( stmt, l, l ) - -def is_in_indices( stmt, idx): - cur = chill.cur_indices(stmt) - return idx in cur - -def copy_to_registers( start_loop, array_name ): - #print "\n\n****** starting copy to registers" - #sys.stdout.flush() - - stmt = 0 # assume stmt 0 - cur = chill.cur_indices(stmt) # calls C - table_Size = len(cur) - - #print "Cur indices", - #print_array(cur) - #print "\nThe table size is %d" % table_Size - #count=1 - #for c in cur: - # print "%d\t%s" % (count,c) - # count += 1 - - #print_code() - - # would be much cleaner if not translating this code from lua! - level_tx = -1 - level_ty = -1 - if is_in_indices(stmt,"tx"): - level_tx = find_cur_level(stmt,"tx") - if is_in_indices(stmt,"ty"): - level_ty = find_cur_level(stmt,"ty") - #print "level_tx %d level_ty %d" % ( level_tx, level_ty ) - #sys.stdout.flush() - - ty_lookup_idx = "" - org_level_ty = level_ty - - # UGLY logic. Lua index starts at 1, so all tests etc here are off by 1 from the lua code - # level_ty initializes to -1 , which is not a valid index, and so there is added code to - # make it not try to acccess offset -1. -1 IS a valid python array index - # to top it off, the else below can assign a NIL to ty_lookup_idx! - if level_ty != -1 and cur[level_ty] != "": - #print "IF cur[%d] = %s" % ( level_ty, cur[level_ty] ) - ty_lookup_idx = cur[level_ty] - else: - #print "ELSE ty_lookup_idx = cur[%d] = %s" % ( level_ty, cur[level_ty-1]) - ty_lookup_idx = cur[level_ty-1] - #print "ty_lookup_idx '%s'" % ty_lookup_idx - - if level_ty > -1: - #print "\ntile3(%d,%d,%d)" % (stmt,level_ty,level_tx+1) - chill.tile3(stmt,level_ty,level_tx+1) - #print_code() - - cur = chill.cur_indices(stmt) # calls C - table_Size = len(cur) - #print "Cur indices ", - #for c in cur: - # print "%s," % c, - #print "\nThe table size is %d" % len(cur) - #count=1 - #for c in cur: - # print "%d\t%s" % (count,c) - # count += 1 - #sys.stdout.flush() - - if is_in_indices(stmt,"tx"): - level_tx = find_cur_level(stmt,"tx") - if ty_lookup_idx != "": # perhaps incorrect test - if is_in_indices(stmt,ty_lookup_idx): - level_ty = find_cur_level(stmt,ty_lookup_idx) - - ty_lookup = 1 - idx_flag = -1 - # find the level of the next valid index after ty+1 - #print "\nlevel_ty %d" % level_ty - if level_ty > -1: - #print "table_Size %d" % table_Size - for num in range(-1 + level_ty+ty_lookup,table_Size): # ?? off by one? - #print "num=%d cur[num] = '%s'" % (num+1, cur[num]) # num+1 is lua index ???? - sys.stdout.flush() - if cur[num] != "": - idx_flag = find_cur_level(stmt,cur[num]) - #print "idx_flag = %d" % idx_flag - break - - #print "\n(first) I am checking all indexes after ty+1 %s" % idx_flag - #print_code() - #print "" - - how_many_levels = 1 - - #print "idx_flag = %d I will check levels starting with %d" % (idx_flag, idx_flag+1) - # lua arrays start at index 1. the next loop in lua starts at offset 0, since idx_flag can be -1 - # thus the check for "not equal nil" in lua (bad idea) - # python arrays start at 0, so will check for things that lua doesn't (?) - startat = idx_flag + 1 - if idx_flag == -1: - startat = 1 # pretend we're lua for now. TODO: fix the logic - - for ch_lev in range(startat,table_Size+1): # logic may be wrong (off by one) - #print "ch_lev %d" % ch_lev - if ch_lev <= table_Size and cur[ch_lev-1] != "": - #print "cur[%d] = '%s'" % ( ch_lev, cur[ch_lev-1] ) - how_many_levels += 1 - - #print "\nHow Many Levels %d" % how_many_levels - sys.stdout.flush() - sys.stdout.flush() - - if how_many_levels< 2: - while( idx_flag >= 0): - for num in range(level_ty+ty_lookup,table_Size+1): - #print "at top of loop, num is %d" % num - #print "cur[num] = '%s'" % cur[num-1] - if cur[num-1] != "": - idx = cur[num-1] - #print "idx '%s'" % idx - sys.stdout.flush() - curlev = find_cur_level(stmt,idx) - #print "curlev %d" % curlev - - #print "\n[COPYTOREG]tile(%d,%d,%d)"%(stmt,curlev,level_tx) - - chill.tile3(stmt, curlev, curlev) - curlev = find_cur_level(stmt,idx) - #print "curlev %d" % curlev - chill.tile3(stmt,curlev,level_tx) - #print "hehe '%s'" % cur[num-1] - - cur = chill.cur_indices(stmt) - #print "Cur indices INSIDE", - #for c in cur: - # print "%s," % c, - table_Size = len(cur) - #print "\nTable Size is: %d" % len(cur) - - level_tx = find_cur_level(stmt,"tx") - #print "\n level TX is: %d" % level_tx - level_ty = find_cur_level(stmt,ty_lookup_idx) - #print "\n level TY is: %d" %level_ty - idx_flag = -1 - #print "idx_flag = -1" - - - #- find the level of the next valid index after ty+1 - #- the following was num, which conflicts with loop we're already in, and otherwise wasn't used (?) - for num2 in range( -1 + level_ty+ty_lookup ,table_Size): # lua starts index at one - #print "num mucking num = %d" % num2 - if(cur[num2] != ""): - #print "cur[%d] = '%s'" % ( num2, cur[num2] ) - idx_flag = find_cur_level(stmt,cur[num2]) - #print("\n(second) I am checking all indexes after ty+1 %s",cur[num2]) - break - - #print "num mucked to %d idx_flag = %d" % (num, idx_flag) - - #print "at bottom of loop, num is %d" % num - - #print "done with levels" - - # this was a block comment ??? - -# for num in range(level_ty+1, table_Size+1): -# print "num %d" % num -# if cur[num-1] != "": -# idx_flag = find_cur_level(stmt,cur[num-1]) ## ugly -# print "idx_flag = %d" % idx_flag - - # change this all to reflect the real logic which is to normalize all loops inside the thread loops. -# print "change this all ...\n" -# print "level_ty+1 %d table_Size-1 %d idx_flag %d" %( level_ty+1, table_Size-1, idx_flag) -# sys.stdout.flush() -# sys.stdout.flush() - -# while level_ty+1 < (table_Size-1) and idx_flag >= 0: -# print "*** level_ty %d" % level_ty -# for num in range(level_ty+2,table_Size+1): # lua for includes second value -# print "num %d cur[num] %s" % (num, cur[num]) -# if cur[num] != "": -# idx = cur[num] -# print "idx='%s'" % idx -# #print_code() - - - - - #print "ARE WE SYNCED HERE?" - #print_code() - - # [Malik] end logic - start_level = find_cur_level(stmt, start_loop) # start_loop was passed parameter! - - # We should hold constant any block or tile loop - block_idxs = chill.block_indices() - thread_idxs = chill.thread_indices() - #print"\nblock indices are" - #for index, val in enumerate(block_idxs): - # print "%d\t%s" % ( int(index)+1 , val ) - #print"\nthread indices are" - #for index, val in enumerate(thread_idxs): - # print "%d\t%s" % ( int(index)+1 , val ) - #print "\nStart Level: %d" % start_level - - hold_constant = [] - #print("\n Now in Blocks") - for idx in block_idxs: - blocklevel = find_cur_level(stmt,idx) - if blocklevel >= start_level: - hold_constant.append(idx) - #print "\nJust inserted block %s in hold_constant" %idx - - #print("\n Now in Threads") - for idx in thread_idxs: - blocklevel = find_cur_level(stmt,idx) - if blocklevel >= start_level: - hold_constant.append(idx) - #print "\nJust inserted thread %s in hold_constant" %idx - #print "\nhold constant table is: " - #for index, val in enumerate(hold_constant): - # print "%d\t%s" % ( int(index)+1 , val ) - - #print("\nbefore datacopy pvt") - old_num_stmts = chill.num_statements() - #sys.stdout.flush() - - #print "\n[DataCopy]datacopy_privatized(%d, %s, %s, " % (stmt, start_loop, array_name), - #print hold_constant, - #print ")" - passtoC = [stmt, start_loop, array_name ] # a list - passtoC.append( len(hold_constant ) ) - for h in hold_constant: - passtoC.append( h ) - chill.datacopy_privatized( tuple( passtoC )) - sys.stdout.flush() - sys.stdout.flush() - - new_num_statements = chill.num_statements() - #print "new num statements %d" % new_num_statements - - # Unroll to the last thread level -# for stmt in range(old_num_statements, new_num_statements): -# print "unrolling statement %d" % stmt -# level = find_cur_level(stmt,thread_idxs[-1]) #get last thread level -# print "level is %d" % level -# idxs = chill.cur_indices(stmt) -# if level < len(idxs): -# chill.unroll(stmt,level+1,0) - - - -def copy_to_shared( start_loop, array_name, alignment ): - #print "\nstarting copy to shared( %s, %s, %d)" % (start_loop, array_name, alignment ) - #print "copy_to_shared( %s, %s, %d) in cudaize.py" % ( start_loop, array_name, alignment ) - stmt = 0 # assume statement 0 - - cur = chill.cur_indices(stmt) - #print "Cur indices ", - #print_array( cur ) - - start_level = find_cur_level( stmt, start_loop ) - #print "start_level %d" % start_level - - old_num_statements = chill.num_statements() - #print "old_num_statements %d" % old_num_statements - - - # Now, we give it indices for up to two dimensions for copy loop - copy_loop_idxs = ["tmp1","tmp2"] - #chill.datacopy_9arg(stmt, start_level, array_name, copy_loop_idxs, False, 0, 1, alignment,True) - passtoC = [stmt, start_level, array_name] # a list - passtoC.append( len(copy_loop_idxs)) - for i in copy_loop_idxs: - passtoC.append(i) - passtoC.append( 0 ) # False - passtoC.append( 0 ) - passtoC.append( 1 ) - passtoC.append( alignment ) - passtoC.append( 1 ) # True - #print "\n[DataCopy]datacopy( ", - #print passtoC, - #print ")" - - #if array_name == "b": - # chill.cheat(1) - #if array_name == "c": - # chill.cheat(2) - - chill.datacopy_9arg( tuple( passtoC )) - - #print "back from datacopy_9arg\n\n\n" - #sys.stdout.flush() - - - #print "calling add_sync( %d, %s )" % ( stmt, start_loop ) - chill.add_sync( stmt, start_loop ) - #print "back from add_sync()\n\n" - - new_num_statements = chill.num_statements() - - # This is fairly CUBLAS2 specific, not sure how well it generalizes, - # but for a 2D copy, what we want to do is "normalize" the first loop - # "tmp1" then get its hard upper bound. We then want to tile it to - # make the control loop of that tile "ty". We then tile "tmp2" with a - # size of 1 and make it "tx". - - #print "fairly CUBLAS2 specific, OLD %d NEW %d" % ( old_num_statements, new_num_statements) - sys.stdout.flush() - sys.stdout.flush() - - for stmt in range(old_num_statements, new_num_statements): - #print "for stmt = %d" % stmt - level = find_cur_level( stmt, "tmp2") - #print "FOUND CUR LEVEL? level '", - #print level, - #print "'" - - #print "in loop, stmt %d level %d" % ( stmt, level ) - if level != -1: - #print "\nCopy to shared: [If was no error]\n" - find_cur_level(stmt,"tmp2") - chill.tile3( stmt, level, level ) - - #print "hard_loop_bounds( %d, %d )" % (stmt, level) - bounds = chill.hard_loop_bounds(stmt, level) - lower = bounds[0] - upper = 1+ bounds[1] - #print "lower %d upper %d" % ( lower, upper ) - - dims = chill.thread_dims() - #print "in cudaize.py copy_to_shared, dims =", - #print dims - tx = dims[0] - ty = dims[1] - #print "2-loop cleanup: lower, upper: %d, %d, tx: %d" % ( lower, upper, tx) - - level = find_cur_level(stmt,"tmp1") - #print "level %d" % level - if tx == upper and ty == 1: - #print "tx = %d upper = %d ty = %d"% (tx, upper, ty) - #print "Don't need" - - # Don't need an extra tile level, just move this loop up - second_level = find_cur_level(stmt,"tmp2") - chill.tile7(stmt, second_level, 1, level, "tx", "tx", counted) - - else: - #print "DO need?" - if ty == 1: - new_ctrl = "tmp3" - else: - new_ctrl = "ty" - - # LOTS of commented out code here in cudaize.lua - - #print_code() - #print "\nStarting tmp2\n" - first_level = find_cur_level(stmt,"tmp1") - second_level = find_cur_level(stmt,"tmp2") - bounds = chill.hard_loop_bounds(stmt, second_level) - lower = bounds[0] - upper = 1 + bounds[1] # BROKEN? - - #print "[Malik]-loop cleanup@tmp2: lower, upper: %d, %d, tx: %d,first level:%d,second_level:%d" % ( lower, upper-1, tx, first_level, second_level) - - # Move the fastest changing dimension loop to the outermost,identified by "tmp2" and to be identified as tx. - #print "\n[fastest]tile(%d, %d, %d,%d,%s,%s,counted)"%(stmt, second_level,1,first_level, "tx", "tx") - chill.tile7(stmt, second_level,1,first_level,"tx","tx",counted) - #print_code() - - first_level = find_cur_level(stmt,"tmp1") - bounds = chill.hard_loop_bounds(stmt, first_level) - lower_1 = bounds[0] - upper_1 = 1 + bounds[1] - tx_level = find_cur_level(stmt,"tx") - bounds = chill.hard_loop_bounds(stmt,tx_level) - lower_tx = bounds[0] - upper_tx = 1+bounds[1] - #print "UL_1 %d %d UL_tx %d %d" % ( lower_1, upper_1-1, lower_tx, upper_tx-1) - - if int(math.ceil( float(upper_tx)/float(tx))) > 1: - #print "ceil I say" - #print "\n[Tile1]tile(%d, %d, %d,%d,%s,%s,counted)" % (stmt, tx_level,tx,tx_level, "tx", "tmp1") - chill.tile7(stmt,tx_level,tx,tx_level,"tx","tmp_tx",counted) - #print_code() - - repeat = find_cur_level(stmt,"tx") - #print "\n[Tile1]tile(%d, %d, %d)" % (stmt, repeat, repeat) - chill.tile3(stmt, repeat, repeat) #find_cur_level(stmt,"tx"),find_cur_level(stmt,"tx")) - #print_code() - - if find_cur_level(stmt,"tx")>find_cur_level(stmt,"tmp_tx"): - #print "\nagain [Tile1]tile(%d, %d, %d)" % (stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx")) - chill.tile3(stmt,find_cur_level(stmt,"tx"),find_cur_level(stmt,"tmp_tx")) - #print_code() - - #print_code() - - #print "\nStarting tmp1\n" - # Handle the other slower changing dimension, the original outermost loop, now identified by "tmp1", to be identified as "ty". - chill.tile3(stmt,find_cur_level(stmt,"tmp1"),find_cur_level(stmt,"tmp1")) - #print_code() - - ty_level = find_cur_level(stmt,"tmp1") - bounds = chill.hard_loop_bounds(stmt,ty_level) - lower_ty = bounds[0] - upper_ty = 1 + bounds[1] - - tx_level = find_cur_level(stmt,"tx") - bounds = chill.hard_loop_bounds(stmt,tx_level) - lower_tx = bounds[0] - upper_tx = 1 + bounds[1] - - #print "[Malik]-loop cleanup@tmp1: lowerty, upperty: %d, %d, ty: %d,ty level:%d,tx_level:%d, stmt: %d" % ( lower_ty, upper_ty-1, ty, ty_level, tx_level, stmt) - - #print "before ceil" - #sys.stdout.flush() - - if(math.ceil(float(upper_ty)/float(ty)) > 1): - #print "CEIL IF" - #print "\n Inside upper_ty/ty > 1\n" - - #print "\n[Tile2]tile(%d, %d, %d,%d,%s,%s,counted)"%(stmt, ty_level,ty,ty_level, "ty", "tmp_ty") - chill.tile7(stmt,ty_level,ty,ty_level,"ty","tmp_ty",counted) - #print_code() - - #print "\n[Tile2-1]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt ,"ty"),find_cur_level(stmt,"ty")) - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"ty")) - #print_code() - - cur_idxs = chill.cur_indices(stmt) - #print "\n cur indexes are ", - #print_array( cur_idxs) - #sys.stdout.flush() - - # Putting ty before any tmp_tx - idx_flag = -1 - if "tmp_tx" in cur_idxs: - idx_flag = 1 + cur_idxs.index("tmp_tx") # lua index starts at 1 - #print "\n (1) so i have found out the value of idx flag as %d" % idx_flag - #sys.stdout.flush() - - if idx_flag >= 0: - if find_cur_level(stmt,"ty") > find_cur_level(stmt,"tmp_ty"): - #print "\n[Tile2-2]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #print_code() - - - # Now Putting ty before any tmp_ty - sys.stdout.flush() - idx_flag = -1 - if "tmp_ty" in cur_idxs: - idx_flag = 1 + cur_idxs.index("tmp_ty") # lua index starts at 1 - #print "\n IF so i have found out the value of idx flag as %d" % idx_flag - #sys.stdout.flush() - - if idx_flag >= 0: - #print "one more test" - sys.stdout.flush() - if find_cur_level(stmt,"ty")>find_cur_level(stmt,"tmp_ty"): - #print "\n[Tile2-2]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #sys.stdout.flush() - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #print_code() - - - - else: - #print "CEIL ELSE" - #print "\n[Tile3]tile(%d, %d, %d,%d,%s,%s,counted)" % (stmt, ty_level,1,ty_level, "ty", "ty") - #sys.stdout.flush() - chill.tile7( stmt, ty_level, 1, ty_level, "ty", "ty", counted ) - #print_code() - - #print "\n[Tile3-1]tile(%d, %d, %d)"%(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1) - sys.stdout.flush() - - chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tx")+1) - #print_code() - - - idx_flag = -1 - # LUA code checks to see if cur_idxs exists? it is unused except in the other clause of this is - #if(cur_idxs) then - #print "CAN NEVER GET HERE? cur_idxs" - #for num= 0,table.getn(cur_idxs) do - #if(cur[num] == "tmp_ty") then - #idx_flag = find_cur_level(stmt,cur[num]) - #break - #end - #end - print "\n ELSE so i have found out the value of idx flag as %d" % idx_flag - if idx_flag >= 0: # can't happen - print "tile( stmt %d, level ty %d, level ty %d" % ( stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - #chill.tile3(stmt,find_cur_level(stmt,"ty"),find_cur_level(stmt,"tmp_ty")) - - - - - - #print "\n\n *** at bottom of if in copy to shared, " - #print_code() - #print "end of if" - - else: - # copy to shared only created one level, not two, so we use a different approach (MV & TMV) - #print "\nCopy to shared: [If was error]\n" - level = find_cur_level(stmt,"tmp1") - chill.tile3(stmt, level, level) - - dims = chill.thread_dims() - #print dims - tx = dims[0] - ty = dims[1] - - bounds = chill.hard_loop_bounds(stmt, level) - lower = bounds[0] - upper = bounds[1] - - #print "bounds lower %d upper %d" % (lower, upper) - upper = upper+1 # upper bound given as <=, compare to dimensions tx which is < - if upper == tx: - #print "upper == tx" - chill.rename_index( stmt, "tmp1", "tx") - else: - #print "upper is not tx" - #print "upper %d tx %d stmt: %d level: %d" % ( upper, tx, stmt, level) - chill.tile7( stmt, level, tx, level, "tx", "tmp_tx", counted) - #print_code() - - #print "stmt:%d level+1: %d" % ( stmt, level+1) - #print("TILE 7") - chill.tile7( stmt, level+1,1,level+1,"tx", "tx",counted) - #print("TILE 3") - chill.tile3( stmt, level+1, level) - #print_code() - - - if ty > 1: - #print "GOING IN" - bounds = chill.hard_loop_bounds(stmt, level+1) - lower = bounds[0] - upper = bounds[1] - #print "ty %d lower %d upper %d" % ( ty, lower, upper ) - floatdiv = float(upper)/float(ty) - bound = int(math.ceil(float(upper)/float(ty))) - #print "NOW FOR Y: upper %d ty %d stmt: %d level: %d bound: %d" % ( upper, ty, stmt, level+1, bound) - chill.tile7(stmt, level+1, bound, level+1, "tmp_ty", "ty", counted) - - # Always add sync - chill.add_sync( stmt, start_loop ) - #print "ending copy to shared\n" - #sys.stdout.flush() - #print_code() - - - - - - - - - - - - - - - - - - - -def unroll_to_depth( max_depth ): - print "\n\nunroll_to_depth(%d)" % max_depth - print "SYNC UP" - sys.stdout.flush() - - cur = chill.cur_indices(0) - thread_idxs = chill.thread_indices() - guard_idx = thread_idxs[-1] # last one - - print "cur indices", - print_array(cur) - print "thread indices", - print_array(thread_idxs) - print "guard_idx = %s" % guard_idx - - #print "thread_idxs = ", - #print thread_idxs - guard_idx = thread_idxs[-1] - #print "guard_idx = %s" % guard_idx - - # HERE FIND OUT THE LOOPS WHICH ARE COMMON BETWEEN STATEMENTS - common_loops = [] - comm_loops_cnt = 0 - num_stmts = chill.num_statements() - print "num statements %d" % num_stmts - - for stmt in range(num_stmts): - sys.stdout.flush() - print "\nSTMT %d" % stmt, - cur_idxs = chill.cur_indices(stmt) - print "Current Indices:", - for c in cur_idxs[:-1]: - print "%s," % c, - print "%s" % cur_idxs[-1] # last one - sys.stdout.flush() - #print_code() - - if chk_cur_level(stmt, "tx") > 0: - - for ii in range(find_cur_level(stmt,"tx")-1): - print "ii = %d\ncur_idxs[%d] = '%s'" % (ii+1, ii+1, cur_idxs[ii]) # print to match lua - id = cur_idxs[ii] - if id not in ["bx", "by", "", "tx", "ty"]: - - print "id %s is not in the list" % id - - for stmt1 in range(stmt+1, num_stmts): - print "\nii %d stmt1 is %d" % (ii+1, stmt1) # print to match lua - cur_idxs1 = chill.cur_indices(stmt1) - print "\nstmt1 cur_idxs1 is ", - for ind in cur_idxs1[:-1]: - print "%s," % ind, - print "%s" % cur_idxs1[-1] - - print "cur level(%d, %s) = %d" % (stmt, "tx", find_cur_level(stmt,"tx") ) - sys.stdout.flush() - - endrange = find_cur_level(stmt,"tx")-1 - print "for iii=1, %d do" % endrange - sys.stdout.flush() - for iii in range(endrange): # off by one? TODO - print "stmt %d ii %d iii %d\n" % (stmt, ii+1, iii+1), - sys.stdout.flush() - - if iii >= len(cur_idxs1): - print "stmt %d ii %d iii %d cur_idxs1[%d] = NIL" % (stmt, ii+1, iii+1, iii+1, ) # print to match lua - else: - print "stmt %d ii %d iii %d cur_idxs1[%d] = '%s'" % (stmt, ii+1, iii+1, iii+1, cur_idxs1[iii]) # print to match lua - sys.stdout.flush() - - # this will still probably die - if iii < len(cur_idxs1) and [iii] not in ["bx", "by", "tx", "ty", ""]: - if cur_idxs[ii] == cur_idxs1[iii]: - print "\nfound idx:%s" % cur_idxs[ii] - common_loops.append(cur_idxs[ii]) - print "cl[%d] = '%s'" % ( comm_loops_cnt, cur_idxs[ii] ) - comm_loops_cnt = len(common_loops) - - if len(common_loops) > 0: - print "\n COMM LOOPS :TOTAL %d, and are " % comm_loops_cnt, - print common_loops, - print " this loop : %s" % common_loops[0] - else: - print "UNROLL can't unroll any loops?" - - - while True: # break at bottom of loop (repeat in lua) - old_num_statements = chill.num_statements() - print "old_num_statements %d" % old_num_statements - - for stmt in range(old_num_statements): - cur_idxs = chill.cur_indices(stmt) - print "stmt %d cur_idxs =" % stmt, - index = 0 - for i in cur_idxs: - index +=1 - if index == len(cur_idxs): - print "%s" %i - else: - print "%s," % i, - - if len(cur_idxs) > 0: - guard_level = -1 - if chk_cur_level(stmt, guard_idx) > 0: - guard_level = find_cur_level(stmt,guard_idx) - print "guard_level(sp) = %d" % guard_level - if guard_level > -1: - level = next_clean_level(cur_idxs,guard_level) - print "next clean level %d" % level - - - #print "looking at %d" % stmt - #print "comparing %d and %d in" % (guard_level, level), - #index = 0 - #for i in cur_idxs: - #index +=1 - #if index == len(cur_idxs): - # print "%s" %i - #else: - # print "%s," % i, - - # need to handle max_depth - num_unrolled = 0 - level_unroll_comm = level - level_arr = [] - - #print "before while, level = %d" % level - while level >= 0: - print "while: level = %d" % level - if num_unrolled == max_depth: - break - - print "Unrolling %d at level %d index %s" % ( stmt, level, cur_idxs[guard_level]) # ??? - level_arr.append(level) - - guard_level = find_cur_level(stmt,guard_idx) - level = next_clean_level(cur_idxs,level+1) - - print "OK, NOW WE UNROLL" - if level_unroll_comm >= 0: - level_arr.reverse() - for i,lev in enumerate(level_arr): - print "\ni=%d" % i - print "[Unroll]unroll(%d, %d, 0)" % (stmt, lev) - chill.unroll(stmt, lev, 0) - - - new_num_statements = chill.num_statements() - if old_num_statements == new_num_statements: - break # exit infinite loop - - -# all other calls to C have a routine in this file (?) -def unroll( statement, level, unroll_amount ): - chill.unroll( statement, level, unroll_amount ) - diff --git a/test-chill/test-cases/examples/cuda-chill/mm.c b/test-chill/test-cases/examples/cuda-chill/mm.c deleted file mode 100644 index 0efbeeb..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mm.c +++ /dev/null @@ -1,10 +0,0 @@ -#define N 1024 - -void normalMM(float c[N][N], float a[N][N], float b[N][N]) { - int i, j, k; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - for (k = 0; k < N; k++) - c[j][i] = c[j][i] + a[k][i] * b[j][k]; -} diff --git a/test-chill/test-cases/examples/cuda-chill/mm.lua b/test-chill/test-cases/examples/cuda-chill/mm.lua deleted file mode 100644 index 5bde1b0..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mm.lua +++ /dev/null @@ -1,38 +0,0 @@ -init("mm.c", "normalMM", 0) -dofile("cudaize.lua") -N=1024 -Ti=128 -Tj=64 -Tk=16 -Tii=16 -Tjj=16 - - - - -N=1024 - - - - - - - - - - - - - -tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j","k"})CU=1 - -tile_by_index({"k"},{Tk},{l1_control="kk"},{"ii","jj","kk","i","j","k"})CU=3 - -tile_by_index({"i","j"},{Tii,Tjj},{l1_control="iii",l2_control="jjj"},{"ii","jj","kk","i","iii","j","jjj","k"},1)CU=2 - -cudaize("mm_GPU",{a=1048576,b=1048576,c=1048576},{block={"ii","jj"}, thread={"i","j"}})CU=2 -copy_to_shared("tx","a",-16) -copy_to_shared("tx","b",-16) -copy_to_registers("kk","c") ---print_code() -unroll_to_depth(2) diff --git a/test-chill/test-cases/examples/cuda-chill/mpeg4.c b/test-chill/test-cases/examples/cuda-chill/mpeg4.c deleted file mode 100755 index 7f83bf7..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mpeg4.c +++ /dev/null @@ -1,23 +0,0 @@ -#define N1 4096 -#define N2 4096 -#define WINDOW_SIZE 16 - -void mpeg4_cpu(float result[N1][N2], float prev[N2+WINDOW_SIZE][N2+WINDOW_SIZE], float curr[WINDOW_SIZE*WINDOW_SIZE]) -{ - unsigned int i; - unsigned int j; - unsigned int k; - unsigned int l; - - for ( i = 0; i < N1; ++i) - for ( j = 0; j < N2; ++j) - for ( k = 0; k < WINDOW_SIZE; ++k) - for ( l = 0; l < WINDOW_SIZE; ++l) - result[i][j] += prev[i+k][j+l] * curr[k*WINDOW_SIZE+l]; - - - - - -} - diff --git a/test-chill/test-cases/examples/cuda-chill/mpeg4.lua b/test-chill/test-cases/examples/cuda-chill/mpeg4.lua deleted file mode 100644 index f025dc0..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mpeg4.lua +++ /dev/null @@ -1,45 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("mpeg4.c", "mpeg4_cpu", 0) - ---dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers,copy_to_shared methods -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers,copy_to_shared methods - -N=4096 -M=4096 -W=16 - ---TI 4ust be <= M ---TJ must be <=TI -Ti=32 -Tj=32 -Tii=16 -Tjj=16 -Tk=4 ---permute(0,{"j","i","k","l"}) -tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j","k","l"}) ---tile_by_index({"k","l"},{Tk*2,Tk*2},{l1_control="kk",l2_control="ll"},{"ii","jj","kk","ll","i","j","k","l"}) ---print_code() ---tile_by_index({"k","l"},{Tk,Tk},{l1_control="kk",l2_control="ll"},{"ii","jj","i","j","kk","k","ll","l"}) -tile_by_index({"i","j"},{Tii,Tjj},{l1_control="iii",l2_control="jjj"},{"ii","jj","iii","i","jjj","j","k","l"}) ---print_code() ---normalize_index("j") ---normalize_index("i") ---print_code() -cudaize("kernel_GPU",{curr=W*W,prev=(N+W)*(M+W),result=N*M},{block={"ii","jj"}, thread={"i","j"}}) ---print_code() -copy_to_shared("iii","prev",16) - -copy_to_registers("jjj","result") - ---print_code() ---copy_to_constant_no_tile("curr") -unroll_to_depth(2) -print_code() -print_space() - - diff --git a/test-chill/test-cases/examples/cuda-chill/mriq-fh.c b/test-chill/test-cases/examples/cuda-chill/mriq-fh.c deleted file mode 100755 index 1e924b7..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mriq-fh.c +++ /dev/null @@ -1,38 +0,0 @@ -#define X 32768 -#define K 256 -struct kValues { - float Kx; - float Ky; - float Kz; - float PhiMag; -}; -extern float sin(float); -extern float cos(float); - -void mriFH_cpu(float *rPhi,float *rRho,float *iRho, float *iPhi, float *rD, float *iD, float *kx, float *ky, float *kz, float *dx, float *dy, float *dz, float *rFHref, float *iFHref) -{ - - float rfh; - float ifh; - float exp; - float cArg; - float sArg; - //float rRho[K]; - //float iRho[K]; - unsigned int k; - unsigned int x; - - - for (x = 0; x < X; ++x) { - for (k = 0; k < K; ++k) { - - exp = 2 * 3.14159 * (kx[k]* dx[x] + ky[k]* dy[x] + kz[k]* dz[x]); - cArg = cos(exp); - sArg = sin(exp); - rFHref[x] += rRho[k]* cArg - iRho[k]* sArg; - iFHref[x] += iRho[k]*cArg + rRho[k]*sArg; - } - - } -} - diff --git a/test-chill/test-cases/examples/cuda-chill/mriq-fh.lua b/test-chill/test-cases/examples/cuda-chill/mriq-fh.lua deleted file mode 100755 index 3277bac..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mriq-fh.lua +++ /dev/null @@ -1,73 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("mriq-fh.c", "mriFH_cpu", 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -N=32768 -M=256 -Tx=256 - - -print_code() ---permute(0,{"j","i"}) ---tile_by_index({"j","i"}, {TI,TJ}, {l1_control="jj", l2_control="ii"}, {"jj","ii", "j", "i"}) -tile_by_index({"x"},{Tx},{l1_control="xx"},{"xx","x","k"}) ---tile_by_index({"x"},{16},{l1_control="xx1"},{"xx","x","xx1","k"}) ---tile_by_index({"j"}, {TI}, {l1_control="jj"}, {"ii","jj", "j", "i"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) -print_code() - -normalize_index("x") ---normalize_index("i") -print_code() ---tile_by_index({"i"}, {TI}, {l1_control="iii",l1_tile="i"}, {"ii","jj", "iii","j","i"}) ---print_code() ---cudaize("Kernel_GPU", {x=N,y=N,z=N,Qr=N,Qi=N,kVals=M},{block={"jj"}, thread={"j"}}) -cudaize("kernel_GPU",{dx=N,dy=N,dz=N,iRho=M,kx=M,ky=M,kz=M,rFHref=N,iFHref=N,rRho=M},{block={"xx"}, thread={"x"}}) ---copy_to_shared("tx","iRho",-16) ---copy_to_shared("tx","dz",1) ---copy_to_shared("tx","rRho",-16) ---copy_to_registers("tx","rFHref") ---copy_to_registers("tx","rRho") ---copy_to_registers("tx","iRho") ---copy_to_registers("tx","kx") ---copy_to_registers("tx","dx") ---copy_to_registers("tx","ky") ---copy_to_registers("tx","dy") ---copy_to_registers("tx","kz") ---copy_to_registers("tx","dz") ---copy_to_registers("tx","iFHref") ---copy_to_texture("rRho") ---copy_to_texture("kx") ---copy_to_texture("dx") ---copy_to_texture("ky") ---copy_to_texture("dy") ---copy_to_texture("kz") ---copy_to_texture("dz") ---copy_to_texture("iRho") ---print_code()--]] ---unroll(0,4,0) ---copy_to_constant_no_tile("kx") ---copy_to_constant_no_tile("ky") ---copy_to_constant_no_tile("kz") ---copy_to_constant_no_tile("rRho") ---copy_to_constant_no_tile("iRho") - ---unroll_to_depth(1) -print_code() ---[[ -copy_to_Texture("rRho") -copy_to_Texture("kx") -copy_to_Texture("dx") -copy_to_Texture("ky") -copy_to_Texture("dy") -copy_to_Texture("kz") -copy_to_Texture("dz") -copy_to_Texture("iRho") ---unroll_to_depth(2) ---]] diff --git a/test-chill/test-cases/examples/cuda-chill/mriq.c b/test-chill/test-cases/examples/cuda-chill/mriq.c deleted file mode 100644 index ba4b87c..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mriq.c +++ /dev/null @@ -1,33 +0,0 @@ -#define N 32768 -#define M 3072 -struct kValues { - float Kx; - float Ky; - float Kz; - float PhiMag; -}; -extern float sinf(float); -extern float cosf(float); - -void -ComputeQCPU(int numK, int numX,struct kValues kVals[M],float x[N], float y[N], float z[N],float Qr[N], float Qi[N]) { - float expArg; - float cosArg; - float sinArg; - float phi; - int i; - int j; - numK = M; - numX = N; - for ( i = 0; i < M; i++) { - for ( j = 0; j < N; j++) { - expArg = 6.2831853071795864769252867665590058f * (kVals[i].Kx * x[j] +kVals[i].Ky * y[j] +kVals[i].Kz * z[j]); - cosArg = cosf(expArg); - sinArg = sinf(expArg); - phi = kVals[i].PhiMag; - Qr[j] += phi * cosArg; - Qi[j] += phi * sinArg; - } - } -} - diff --git a/test-chill/test-cases/examples/cuda-chill/mriq.lua b/test-chill/test-cases/examples/cuda-chill/mriq.lua deleted file mode 100644 index 1170111..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mriq.lua +++ /dev/null @@ -1,55 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("mriq.c", "ComputeQCPU", 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -N=32768 -M=3072 -TI=128 -TJ=128 - -permute(0,{"j","i"}) ---tile_by_index({"j","i"}, {TI,TJ}, {l1_control="jj", l2_control="ii"}, {"jj","ii", "j", "i"}) -tile_by_index({"i"}, {TJ}, {l1_control="ii",l1_tile="i"}, {"ii", "j","i"}) -tile_by_index({"j"}, {TI}, {l1_control="jj"}, {"ii","jj", "j", "i"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() - -normalize_index("j") -normalize_index("i") ---print_code() ---tile_by_index({"i"}, {TI}, {l1_control="iii",l1_tile="i"}, {"ii","jj", "iii","j","i"}) ---print_code() -cudaize("Kernel_GPU", {x=N,y=N,z=N,Qr=N,Qi=N,kVals=M},{block={"jj"}, thread={"j"}}) - -copy_to_shared("tx","kVals",1) ---copy_to_shared("tx","x",1) ---copy_to_shared("tx","y",1) ---copy_to_shared("tx","z",1) - ---copy_to_texture("kVals") ---datacopy(0, 3, "kVals", {"tt","t"},false,0,1,-16,true) ---print_code() ---datacopy_privatized(0,"tx","kVals",{"tx"}) ---copy_to_registers("tx","kVals") -copy_to_registers("ii","x") -copy_to_registers("ii","y") -copy_to_registers("ii","z") -copy_to_registers("ii","Qi") -copy_to_registers("ii","Qr") ---[[datacopy_privatized(0,"tx","x",{"tx"}) -datacopy_privatized(0,"tx","y",{"tx"}) -datacopy_privatized(0,"tx","z",{"tx"}) -datacopy_privatized(0,"tx","Qi",{"tx"}) -datacopy_privatized(0,"tx","Qr",{"tx"}) - - -]]-- ---unroll(0,5,64) -print_code() ---unroll_to_depth(1) --won't unroll past thread/loop mapping, unrolls up to two loop levels diff --git a/test-chill/test-cases/examples/cuda-chill/mv-shadow.c b/test-chill/test-cases/examples/cuda-chill/mv-shadow.c deleted file mode 100644 index 582b187..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mv-shadow.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[j][i] * b[j]; -} diff --git a/test-chill/test-cases/examples/cuda-chill/mv-shadow.lua b/test-chill/test-cases/examples/cuda-chill/mv-shadow.lua deleted file mode 100644 index 43e8491..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mv-shadow.lua +++ /dev/null @@ -1,65 +0,0 @@ -init("mv-shadow.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=129 -TI=32 -TJ=64 - -N=1024 -TI=16 - - - - - - - - - - - - - - - - ---Tile the i and j loop, introducing "ii" as the control loop for the "i" ---tile, "k" for the control loop fo the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TJ}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) ---tile_by_index({"j"}, {TI}, {l2_control="k"}, { "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("ii") -normalize_index("i") -print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("mv_GPU", {a=N, b=N, c=N*N}, {block={"ii"}, thread={"i"}}) ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy - ---copy_to_shared("tx", "b", 1) ---copy_to_shared("tx", "c", -16) ---print_code() ---copy_to_texture("b") ---copy_to_texture("c") -copy_to_registers("k", "a") ---print_code() - -unroll_to_depth(1) --won't unroll past thread/loop mapping, unrolls up to two loop levels ---copy_to_texture("b") ---print_code() ---unroll(0,5,0) ---print_code() diff --git a/test-chill/test-cases/examples/cuda-chill/mv.c b/test-chill/test-cases/examples/cuda-chill/mv.c deleted file mode 100644 index 582b187..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mv.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[j][i] * b[j]; -} diff --git a/test-chill/test-cases/examples/cuda-chill/mv.lua b/test-chill/test-cases/examples/cuda-chill/mv.lua deleted file mode 100644 index ca54501..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mv.lua +++ /dev/null @@ -1,65 +0,0 @@ -init("mv.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=129 -TI=32 -TJ=64 - -N=1024 - - - - - - - - - - - - - - - - ---Tile the i and j loop, introducing "ii" as the control loop for the "i" ---tile, "k" for the control loop fo the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TJ}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) ---tile_by_index({"j"}, {TI}, {l2_control="k"}, { "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("ii") -normalize_index("i") -print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("mv_GPU", {a=N, b=N, c=N*N}, {block={"ii"}, thread={"i"}}) - ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy - ---copy_to_shared("tx", "b", 1) ---copy_to_shared("tx", "c", -16) ---print_code() ---copy_to_texture("b") ---copy_to_texture("c") -copy_to_registers("k", "a") ---print_code() - -unroll_to_depth(1) --won't unroll past thread/loop mapping, unrolls up to two loop levels ---copy_to_texture("b") ---print_code() ---unroll(0,5,0) ---print_code() diff --git a/test-chill/test-cases/examples/cuda-chill/mv_try.c b/test-chill/test-cases/examples/cuda-chill/mv_try.c deleted file mode 100644 index 7781f3b..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mv_try.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 4096 - -void normalMV(int n, float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - a[i] = a[i] + c[i][j] * b[j]; -} diff --git a/test-chill/test-cases/examples/cuda-chill/mv_try.lua b/test-chill/test-cases/examples/cuda-chill/mv_try.lua deleted file mode 100644 index db4d9ad..0000000 --- a/test-chill/test-cases/examples/cuda-chill/mv_try.lua +++ /dev/null @@ -1,14 +0,0 @@ -init("mv_try.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -TI=96 - -N=4096 - - -tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) -cudaize("mv_GPU", {a=N, b=N, c=N*N}, - {block={"ii"}, thread={"i"}}) - -print_code() diff --git a/test-chill/test-cases/examples/cuda-chill/nbody.c b/test-chill/test-cases/examples/cuda-chill/nbody.c deleted file mode 100644 index 57899b6..0000000 --- a/test-chill/test-cases/examples/cuda-chill/nbody.c +++ /dev/null @@ -1,66 +0,0 @@ -#define NBODIES 16384 -#define SOFTENINGSQUARED 0.01f -#define DELTATIME 0.001f -#define DAMPING 1.0f - -#define NBLOCKSY 1 -#define NBLOCKSX (NBODIES/NTHREADSX) -#define NTHREADSY 1 -#define NTHREADSX 64 - -#define BLOCKSIZE 128 - -#define SHARED 1 -#define TIMER 1 -#define VERIFY 1 - -extern float sqrtf(float); - -void nbody_cpu(float* oldpos,float* oldpos1, float *newpos, float *oldvel, float *newvel, float *force) -{ - float r0,r1,r2; - float invDist, invDistCube, mass, invMass; - unsigned int i,j; - for(i = 0; i < NBODIES; ++i) { - //force[i*4 ] = 0; - //force[i*4+1] = 0; - //force[i*4+2] = 0; - //force[i*4+3] = 0; - for(j = 0; j < NBODIES; ++j) { - r0 = oldpos[j*4]-oldpos1[i*4]; - r1 = oldpos[j*4+1]-oldpos1[i*4+1]; - r2 = oldpos[j*4+2]-oldpos1[i*4+2]; - - invDist = 1.0/sqrtf(r0 * r0 + r1 * r1 + r2 * r2 + SOFTENINGSQUARED); - invDistCube = invDist * invDist * invDist; - mass = oldpos1[i*4+3]; - - force[i*4] = force[i*4] + r0 * mass * invDistCube; - force[i*4+1] = force[i*4+1] + r1 * mass * invDistCube; - force[i*4+2] = force[i*4+2] + r2 * mass * invDistCube; - - } - } - -/* for (i = 0; i < NBODIES; ++i) { - invMass = oldvel[4*i+3]; - - oldvel[4*i] += (force[4*i] * invMass) * DELTATIME * DAMPING; - oldvel[4*i+1] += (force[4*i+1] * invMass) * DELTATIME * DAMPING; - oldvel[4*i+2] += (force[4*i+2] * invMass) * DELTATIME * DAMPING; - - oldpos[4*i] += oldvel[4*i] * DELTATIME; - oldpos[4*i+1] += oldvel[4*i+1] * DELTATIME; - oldpos[4*i+2] += oldvel[4*i+2] * DELTATIME; - - newpos[4*i+0] = oldpos[4*i]; - newpos[4*i+1] = oldpos[4*i+1]; - newpos[4*i+2] = oldpos[4*i+2]; - newpos[4*i+3] = oldpos[4*i+3]; - - newvel[4*i+0] = oldvel[4*i]; - newvel[4*i+1] = oldvel[4*i+1]; - newvel[4*i+2] = oldvel[4*i+2]; - newvel[4*i+3] = oldvel[4*i+3]; - }*/ -} diff --git a/test-chill/test-cases/examples/cuda-chill/nbody.lua b/test-chill/test-cases/examples/cuda-chill/nbody.lua deleted file mode 100644 index 08f88a9..0000000 --- a/test-chill/test-cases/examples/cuda-chill/nbody.lua +++ /dev/null @@ -1,53 +0,0 @@ ---CUBLAS 2 MM Multiply - ---This function form intializes "CUDAIZE v2" versus "CUDAIZE v1" if you ---call init() and use global variables to specify procedure and loop - ---Second parameter is procedure # and third is loop # -init("nbody.c", "nbody_cpu" , 0) - -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods -NBODIES=16384 - - ---Tj=128 CHANGE FOR BEST..... BEST IS 64BLOCKS 128THREADS ---Ti=256 -Tj=64 -Ti=32 -Tjjj=1 -Tiii=1 -Tn=0.1 ---normalize_index("j") --- ---print_code() ---normalize_index("n") --- TILE COMMANDS ZEROOOOOOOOOOO:3 ---tile_by_index({"i","j"},{Ti,Tj},{l1_control="ii",l2_control="jj"},{"ii","jj","i","j"})--CU=-1 -tile_by_index({"i"},{Ti},{l1_control="ii"},{"ii","i","j"})--CU=-1 ---normalize_index("i") ---tile_by_index({"n"},{Tn},{l1_control="nn"},{"jj","ii","nn","j","i","n"})--CU=-1 - ---tile_by_index({"j","i"},{Tjjj,Tiii},{l1_control="jjj",l2_control="iii"},{"jj","ii","nn","jjj","j","iii","i","n"})--CU=3 ---tile_by_index({"j"}, {Tn}, {l1_control="j",l1_tile="jjj"}, {"ii", "jj", "nn","jjj","j","i","n"}) ---tile_by_index({"i"}, {Ti/2}, {l1_control="iii"}, {"ii","iii", "jj","i","j"}) ---print_code() -cudaize("kernel_GPU",{oldpos=4*NBODIES,oldpos1=4*NBODIES,oldvel=4*NBODIES,force=4*NBODIES,newpos=4*NBODIES,newvel=4*NBODIES},{block={"ii"}, thread={"i"}})--CU=3 -print_code() ---tile(0,6,6) ---copy_to_shared("tx","oldpos",-16) ---copy_to_registers("j","oldpos") ---copy_to_registers("j","oldpos1") ---copy_to_registers("j","force") - ---copy_to_texture("oldpos") ---tile(1,3,3) ---tile(2,3,3) - -print_code() ---unroll_to_depth(1) --- ---tile(2,3,3) ---unroll(2,3,0) ---unroll(0,5,0) ---print_code() diff --git a/test-chill/test-cases/examples/cuda-chill/tmv-shadow.c b/test-chill/test-cases/examples/cuda-chill/tmv-shadow.c deleted file mode 100644 index cb9ea8d..0000000 --- a/test-chill/test-cases/examples/cuda-chill/tmv-shadow.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[i][j] * b[j]; -} diff --git a/test-chill/test-cases/examples/cuda-chill/tmv-shadow.lua b/test-chill/test-cases/examples/cuda-chill/tmv-shadow.lua deleted file mode 100644 index 196b939..0000000 --- a/test-chill/test-cases/examples/cuda-chill/tmv-shadow.lua +++ /dev/null @@ -1,50 +0,0 @@ -init("tmv-shadow.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=1024 ---N= 8209 ---N=129 -TI=64 -N=1024 -TI=32 ---tile, "k" for the control loop for the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TI}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---tile_by_index({"i"}, {TI/32}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) - ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("i") ---print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("tmv_GPU", {a=N, b=N, c=N*N},{block={"ii"}, thread={"i"}}) - ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy -copy_to_shared("tx", "b", 1) ---copy_to_texture("b") ---print_code() - -copy_to_shared("tx", "c", -16) ---copy_to_texture("c") ---print_code() - -copy_to_registers("k", "a") -print_code() ---unroll(0,5,0) ---unroll(0,4,0) ---unroll(2,4,16) -unroll_to_depth(1) ---print_code() diff --git a/test-chill/test-cases/examples/cuda-chill/tmv.c b/test-chill/test-cases/examples/cuda-chill/tmv.c deleted file mode 100644 index cb9ea8d..0000000 --- a/test-chill/test-cases/examples/cuda-chill/tmv.c +++ /dev/null @@ -1,9 +0,0 @@ -#define N 1024 - -void normalMV(float c[N][N], float a[N], float b[N]) { - int i, j; - - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - a[i] = a[i] + c[i][j] * b[j]; -} diff --git a/test-chill/test-cases/examples/cuda-chill/tmv.lua b/test-chill/test-cases/examples/cuda-chill/tmv.lua deleted file mode 100644 index 5071108..0000000 --- a/test-chill/test-cases/examples/cuda-chill/tmv.lua +++ /dev/null @@ -1,50 +0,0 @@ -init("tmv.c","normalMV",0) -dofile("cudaize.lua") --defines custom tile_by_index, copy_to_registers, - --copy_to_shared methods - -N=1024 ---N= 8209 ---N=129 -TI=64 -N=1024 -TI=32 ---tile, "k" for the control loop for the "j" tile, with the final order ---of {"ii", "k", "i", "j"} -tile_by_index({"i","j"}, {TI,TI}, {l1_control="ii", l2_control="k"}, {"ii", "k", "i", "j"}) ---tile_by_index({"i"}, {TI}, {l1_control="ii"}, {"ii", "i", "j"}) ---print_code() ---tile_by_index({"i"}, {TI/32}, {l1_control="iii"}, {"ii", "k", "iii","i", "j"}) - ---print_code() ---Normalize indx will do a tile size of one over the loop level specified ---by the input index. This is useful to get a zero lower bound and hard ---upper bound on a loop instead of it being relative to previous loop ---levels. ---normalize_index("i") ---print_code() - ---Cudaize now determines the grid dimentions from the loops themselves ---(the upper bounds of the block and thread loops). It also renames the ---given block and thread loops's indexes to the approviate values from ---the set {"bx","by","tx","ty","tz"}. The second parameter specifies the ---size of the arrays to be copied in the CUDA scaffolding. -cudaize("tmv_GPU", {a=N, b=N, c=N*N},{block={"ii"}, thread={"i"}}) - ---print_code() - ---Does a datacopy, tile, and add_sync to get a shared memory copy -copy_to_shared("tx", "b", 1) ---copy_to_texture("b") ---print_code() - -copy_to_shared("tx", "c", -16) ---copy_to_texture("c") ---print_code() - -copy_to_registers("k", "a") -print_code() ---unroll(0,5,0) ---unroll(0,4,0) ---unroll(2,4,16) -unroll_to_depth(1) ---print_code() diff --git a/test-chill/test-cases/unit/chill-basic-python.tclist b/test-chill/test-cases/unit/chill-basic-python.tclist deleted file mode 100644 index 555fa25..0000000 --- a/test-chill/test-cases/unit/chill-basic-python.tclist +++ /dev/null @@ -1,20 +0,0 @@ -build-chill-testcase -v dev -i python - -chill-testcase test-cases/chill/test_distribute.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_fuse.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_known.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_original.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_peel.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_permute.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_print_code.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_print_dep.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_print_space.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_reverse.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_scale.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_shift.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_shift_to.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_skew.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_tile.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_unroll_extra.py test-cases/chill/mm.c -chill-testcase test-cases/chill/test_unroll.py test-cases/chill/mm.c - diff --git a/test-chill/test-cases/unit/chill-basic-script.tclist b/test-chill/test-cases/unit/chill-basic-script.tclist deleted file mode 100644 index 8bc34dc..0000000 --- a/test-chill/test-cases/unit/chill-basic-script.tclist +++ /dev/null @@ -1,20 +0,0 @@ -build-chill-testcase -v dev - -chill-testcase test-cases/chill/test_distribute.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_fuse.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_known.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_original.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_peel.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_permute.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_print_code.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_print_dep.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_print_space.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_reverse.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_scale.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_shift.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_shift_to.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_skew.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_tile.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_unroll_extra.script test-cases/chill/mm.c -chill-testcase test-cases/chill/test_unroll.script test-cases/chill/mm.c - diff --git a/test-chill/test-cases/unit/chill-basic.tclist b/test-chill/test-cases/unit/chill-basic.tclist deleted file mode 100644 index 57cddbd..0000000 --- a/test-chill/test-cases/unit/chill-basic.tclist +++ /dev/null @@ -1,4 +0,0 @@ - --w $STAGING_DIR_WD -O $OMEGA_DEV_SRC -C $CHILL_DEV_SRC -b $STAGING_DIR_BIN batch test-cases/unit/chill-basic-script.tclist --w $STAGING_DIR_WD -O $OMEGA_DEV_SRC -C $CHILL_DEV_SRC -b $STAGING_DIR_BIN batch test-cases/unit/chill-basic-python.tclist - diff --git a/test-chill/test-cases/chill/test_distribute.py b/test-chill/test_distribute.py index 760d29f..760d29f 100644 --- a/test-chill/test-cases/chill/test_distribute.py +++ b/test-chill/test_distribute.py diff --git a/test-chill/test-cases/chill/test_fuse.py b/test-chill/test_fuse.py index 32c594c..32c594c 100644 --- a/test-chill/test-cases/chill/test_fuse.py +++ b/test-chill/test_fuse.py diff --git a/test-chill/test-cases/chill/test_known.py b/test-chill/test_known.py index 662d7d0..662d7d0 100644 --- a/test-chill/test-cases/chill/test_known.py +++ b/test-chill/test_known.py diff --git a/test-chill/test-cases/chill/test_known_2.py b/test-chill/test_known_2.py index 5b16325..5b16325 100644 --- a/test-chill/test-cases/chill/test_known_2.py +++ b/test-chill/test_known_2.py diff --git a/test-chill/test-cases/chill/test_original.py b/test-chill/test_original.py index 2d17799..2d17799 100644 --- a/test-chill/test-cases/chill/test_original.py +++ b/test-chill/test_original.py diff --git a/test-chill/test-cases/chill/test_peel.py b/test-chill/test_peel.py index bb6c583..bb6c583 100644 --- a/test-chill/test-cases/chill/test_peel.py +++ b/test-chill/test_peel.py diff --git a/test-chill/test-cases/chill/test_permute.py b/test-chill/test_permute.py index c201d2f..ff4a42a 100644 --- a/test-chill/test-cases/chill/test_permute.py +++ b/test-chill/test_permute.py @@ -8,5 +8,5 @@ loop(0) known('ambn > 0') known('an > 0') known('bm > 0') -permute([3,1,2]) +permute([3,2,1]) print_code() diff --git a/test-chill/test-cases/chill/test_print_code.py b/test-chill/test_print_code.py index 004c46c..004c46c 100644 --- a/test-chill/test-cases/chill/test_print_code.py +++ b/test-chill/test_print_code.py diff --git a/test-chill/test-cases/chill/test_print_dep.py b/test-chill/test_print_dep.py index a3dee29..a3dee29 100644 --- a/test-chill/test-cases/chill/test_print_dep.py +++ b/test-chill/test_print_dep.py diff --git a/test-chill/test-cases/chill/test_print_space.py b/test-chill/test_print_space.py index 2f8f678..2f8f678 100644 --- a/test-chill/test-cases/chill/test_print_space.py +++ b/test-chill/test_print_space.py diff --git a/test-chill/test-cases/chill/test_reverse.py b/test-chill/test_reverse.py index a97c611..a97c611 100644 --- a/test-chill/test-cases/chill/test_reverse.py +++ b/test-chill/test_reverse.py diff --git a/test-chill/test-cases/chill/test_scale.py b/test-chill/test_scale.py index ee8455d..ee8455d 100644 --- a/test-chill/test-cases/chill/test_scale.py +++ b/test-chill/test_scale.py diff --git a/test-chill/test-cases/chill/test_shift.py b/test-chill/test_shift.py index b3fc6ab..b3fc6ab 100644 --- a/test-chill/test-cases/chill/test_shift.py +++ b/test-chill/test_shift.py diff --git a/test-chill/test-cases/chill/test_shift_to.py b/test-chill/test_shift_to.py index f3537c5..f3537c5 100644 --- a/test-chill/test-cases/chill/test_shift_to.py +++ b/test-chill/test_shift_to.py diff --git a/test-chill/test-cases/chill/test_skew.py b/test-chill/test_skew.py index c7271f4..c7271f4 100644 --- a/test-chill/test-cases/chill/test_skew.py +++ b/test-chill/test_skew.py diff --git a/test-chill/test-cases/chill/test_tile.py b/test-chill/test_tile.py index fbe0368..fbe0368 100644 --- a/test-chill/test-cases/chill/test_tile.py +++ b/test-chill/test_tile.py diff --git a/test-chill/test-cases/chill/test_unroll.py b/test-chill/test_unroll.py index 39dd0db..39dd0db 100644 --- a/test-chill/test-cases/chill/test_unroll.py +++ b/test-chill/test_unroll.py diff --git a/test-chill/test-cases/chill/test_unroll_extra.py b/test-chill/test_unroll_extra.py index 929313c..929313c 100644 --- a/test-chill/test-cases/chill/test_unroll_extra.py +++ b/test-chill/test_unroll_extra.py diff --git a/test-chill/testchill/__init__.py b/test-chill/testchill/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/test-chill/testchill/__init__.py +++ /dev/null diff --git a/test-chill/testchill/__main__.py b/test-chill/testchill/__main__.py deleted file mode 100644 index 86415c3..0000000 --- a/test-chill/testchill/__main__.py +++ /dev/null @@ -1,368 +0,0 @@ -#TODO: setup and cleanup mechanism - -import argparse -import logging -import os -import pickle -import sys -import textwrap - -from . import chill -from . import gcov -from . import test -from . import util - - - -def make_local(argsns, arg_parser): - """ - Make the local test case list. A convinience function for testing a local copy of chill. - @params argsns Command line arguments - @params arg_parser The ArgumentParser object - """ - util.mkdir_p(os.path.join(os.getcwd(), '.staging'), temp=True) - argsns.wd = os.path.join(os.getcwd(), '.staging/wd') - argsns.bin_dir = os.path.join(os.getcwd(), '.staging/bin') - argsns.chill_tc_dir = os.path.join(os.getcwd(), 'test-cases') # formally from the commandline - argsns.chill_dir = os.path.abspath(argsns.chill_dir) - argsns.chill_build_coverage = argsns.coverage_set is not None #TODO: make arg passed to local. - argsns.chill_test_coverage = argsns.coverage_set is not None - - util.mkdir_p(argsns.wd) - util.mkdir_p(argsns.bin_dir) - util.shell('cp', [os.path.join(argsns.chill_dir, 'examples/cuda-chill/cudaize.lua'), argsns.wd]) - util.shell('cp', [os.path.join(argsns.chill_dir, 'examples/cuda-chill/cudaize.py'), argsns.wd]) - - for config in chill.ChillConfig.configs(argsns.chill_dir, argsns.bin_dir): - build_testcase = chill.BuildChillTestCase(config, options={'coverage': argsns.chill_build_coverage}, coverage_set=argsns.coverage_set) - yield build_testcase - batch_file = os.path.join(argsns.chill_tc_dir, config.name + '.tclist') - for tc in make_batch_testcaselist(argsns, arg_parser, batch_file): - yield tc - -#def make_repo(argsns, arg_parser): - """ - Make the repo test case list. A convinience function for testing chill from the repsitory. - @params argsns Command line arguments - @params arg_parser The ArgumentParser object - """ -# util.mkdir_p(os.path.join(os.getcwd(), '.staging'), temp=True) -# argsns.bin_dir = os.path.join(os.getcwd(), '.staging/bin') -# argsns.repo_dir = os.path.join(os.getcwd(), '.staging/repo') -# argsns.chill_tc_dir = os.path.join(os.getcwd(), 'test-cases') # formally from the commandline -# argsns.wd = os.path.join(os.getcwd(), '.staging/wd') -# -# util.mkdir_p(argsns.bin_dir) -# util.mkdir_p(argsns.repo_dir) -# util.mkdir_p(argsns.wd) -# -# #TODO: Should these be hard coded? -# repo_root = 'shell.cs.utah.edu/uusoc/facility/res/hallresearch/svn_repo/resRepo/projects' -# for version in ['release', 'dev']: -# new_args = util.copy(argsns) -# if version == 'dev': -# chill_repo = 'svn+ssh://{}@{}/chill/branches/cuda-chill-rose'.format(new_args.svnuser, repo_root) -# chill_repo_name = 'chill' -# omega_repo = 'svn+ssh://{}@{}/omega/branches/cuda-omega-rose'.format(new_args.svnuser, repo_root) -# omega_repo_name = 'omega' -# elif version == 'release': -# chill_repo = 'svn+ssh://{}@{}/chill/release'.format(new_args.svnuser, repo_root) -# chill_repo_name = 'chill-release' -# omega_repo = 'svn+ssh://{}@{}/omega/release'.format(new_args.svnuser, repo_root) -# omega_repo_name = 'omega-release' -# new_args.omega_dir = os.path.join(new_args.repo_dir, omega_repo_name) -# new_args.chill_dir = os.path.join(new_args.repo_dir, chill_repo_name) -# util.shell('svn', ['export', '--force', omega_repo, new_args.omega_dir]) -# util.shell('svn', ['export', '--force', chill_repo, new_args.chill_dir]) -# util.shell('cp', [os.path.join(new_args.chill_dir, 'examples/cuda-chill/cudaize.lua'), new_args.wd]) -# if version == 'dev': -# util.shell('cp', [os.path.join(new_args.chill_dir, 'examples/cuda-chill/cudaize.py'), new_args.wd]) -# # do omega: (just build it for now) -# yield omega.BuildOmegaTestCase(new_args.omega_dir ,version) -# # do chill -# for config in chill.ChillConfig.configs(new_args.omega_dir, new_args.chill_dir, new_args.bin_dir, version=version): -# yield chill.BuildChillTestCase(config, coverage_set=argsns.coverage_set) -# batch_file = os.path.join(argsns.chill_tc_dir, config.name() + '.tclist') -# if os.path.exists(batch_file): -# for tc in make_batch_testcaselist(new_args, arg_parser, batch_file): -# yield tc - -def make_runchill_testcase(argsns): - """ - Make a RunChillTestCase from the given argument namespace - @param argsns Command line arguments - """ - assert (argsns.chill_dir != None) or (argsns.bin_dir != None) - - ### Required parameters ### - wd = os.path.abspath(argsns.wd) - chill_script = os.path.abspath(argsns.chill_script) - chill_src = os.path.abspath(argsns.chill_src) - coverage_set = argsns.coverage_set - - ### Options to pass to the chill test case ### - options = dict() - options['compile-src'] = argsns.chill_test_compile_src - options['run-script'] = argsns.chill_test_run_script - options['compile-gensrc'] = argsns.chill_test_compile_gensrc - options['check-run-script-stdout'] = argsns.chill_test_check_run_script - options['coverage'] = argsns.chill_test_coverage - - ### choose interface language from script extension if none is given ### - if argsns.chill_script_lang is None: - argsns.chill_script_lang = chill.ChillConfig.ext_to_script_lang(chill_script.split('.')[-1]) - - config = chill.ChillConfig( - chill_dir = os.path.abspath(argsns.chill_dir) if argsns.chill_dir != None else None, - bin_dir = os.path.abspath(argsns.bin_dir) if argsns.bin_dir != None else None, - build_cuda = argsns.build_cuda, - script_lang = argsns.chill_script_lang) - - return chill.RunChillTestCase(config, chill_script, chill_src, wd=wd, options=options, coverage_set=coverage_set) - -def make_buildchill_testcase(argsns): - """ - Make a BuilChillTestCase from the given argument namespace - @param argsns Command line arguments - """ - assert argsns.chill_dir != None - - coverage_set = argsns.coverage_set - - options = dict() - options['coverage'] = argsns.chill_build_coverage - - config = chill.ChillConfig( - chill_dir = os.path.abspath(argsns.chill_dir) if argsns.chill_dir != None else None, - bin_dir = os.path.abspath(argsns.bin_dir) if argsns.bin_dir != None else None, - build_cuda = argsns.build_cuda, - script_lang = argsns.chill_script_lang) - - return chill.BuildChillTestCase(config, options=options, coverage_set=coverage_set) - -def make_batch_testcaselist(argsns, arg_parser, batch_file=None): - """ - Make a list of test cases from a file. - @param argsns The parent argument namespace - @param arg_parser The argument parser. Used to parse lines from the batch file. - @param batch_file The batch file name - """ - if batch_file is None: - batch_file = argsns.batch_file - with open(batch_file, 'r') as f: - for txt_line in f.readlines(): - if len(txt_line.strip()) == 0: continue # skip empty lines - if txt_line.strip().startswith('#'): continue # skip comment lines - args = util.applyenv(txt_line.strip()) # replace environment variables with thier values - args = args.split() # split by whitespace - for tc in args_to_tclist(args, arg_parser, argsns): - yield tc - -@util.callonce -def add_local_args(arg_parser): - """ - Command line arguments for the local command - @param arg_parser The local ArgumentParser object - """ - arg_parser.add_argument('chill_dir', metavar='chill-home', default='../') - #arg_parser.add_argument('-v', '--chill-branch', dest='chill_version', default='dev', choices=['release','dev']) - # - Testing should consider all interface languages. Will uncomment if testing takes too long - # arg_parser.add_argument('-i', '--interface-lang', nargs=1, action='append', dest='chill_script_lang_list', choices=['script','lua','python']) - # arg_parser.add_argument('-t', '--testcase-dir', dest='chill_tc_dir', default=os.path.join(os.getcwd(), 'test-cases/')) - arg_parser.set_defaults(wd=os.path.join(os.getcwd(), '.staging/wd')) - arg_parser.set_defaults(bin_dir=os.path.join(os.getcwd(), '.staging/bin')) - -@util.callonce -def add_repo_args(arg_parser): - """ - Command line arguments for the repo command - @param arg_parser The local ArgumentParser object - """ - arg_parser.add_argument('svnuser', metavar='svn-user-name') - -def add_boolean_option(arg_parser, name, dest, default=True, help_on=None, help_off=None): - """ - Add a boolean option. - @param parg_parser The ArgumentParser object - @param name The name of the parameter - @param dest The dest parameter passed to the ArgumentParser - @param default The default value - @param help_on The help parameter for the true option - @param help_off The help parameter for the false option - """ - group = arg_parser.add_mutually_exclusive_group() - group.add_argument('--' + name, action='store_true', dest=dest, default=default, help=help_on) - group.add_argument('--no-' + name, action='store_false', dest=dest, default=default, help=help_off) - -def add_chill_common_args(arg_parser): - """ - Common chill command line arguments. - @param arg_parser The ArgumentParser object - """ - cuda_group = arg_parser.add_mutually_exclusive_group() - cuda_group.add_argument('-u', '--target-cuda', action='store_const', const=True, dest='build_cuda', default=False, help='Test cuda-chill. (Default is chill)') - cuda_group.add_argument('-c', '--target-c', action='store_const', const=False, dest='build_cuda', default=False, help='Test chill. (Default is chill)') - arg_parser.add_argument('-i', '--interface-lang', dest='chill_script_lang', choices=['script','lua','python'], default=None, help='Chill interface language. If an interface language is not specified, it will be determined by the script file name.') - -@util.callonce -def add_chill_run_args(arg_parser): - """ - Command line arguments specific to running a chill test case - @param arg_parser The ArgumentParser object - """ - arg_parser.add_argument('chill_script', help='Chill script file.', metavar='chill-script') - arg_parser.add_argument('chill_src', help='Chill source file.', metavar='chill-src') - add_boolean_option(arg_parser, 'compile-src', dest='chill_test_compile_src', default=True, help_on='Compile source file.', help_off='Do not compile source file.') - add_boolean_option(arg_parser, 'run-script', dest='chill_test_run_script', default=True, help_on='Run chill script.', help_off='Do not run chill script.') - add_boolean_option(arg_parser, 'compile-gensrc', dest='chill_test_compile_gensrc', default=True, help_on='Compile generated source file', help_off='Do not compile generated source file.') - add_boolean_option(arg_parser, 'check-run-script', dest='chill_test_check_run_script', default=False, help_on='Diff stdout from chill script against a benchmark.') - add_boolean_option(arg_parser, 'test-coverage', 'chill_test_coverage', default=False, help_on='Run chill and record code coverage (default).', help_off='Run chill normally without recording code coverage.') - -@util.callonce -def add_chill_build_args(arg_parser): - """ - Command line arguments specific to building chill and testing the build process - @params arg_parser The ArgumentParser object - """ - add_boolean_option(arg_parser, 'build-coverage', 'chill_build_coverage', default=False, help_on='Build chill for code coverage flags (default).', help_off='Build chill normally without code coverage flags.') - -@util.callonce -def add_local_command(command_group): - """ - Add local to the subcommand group - @param command_group the subparser group object - """ - local_arg_parser = command_group.add_parser('local') - add_local_args(local_arg_parser) - local_arg_parser.set_defaults(func=lambda a, ap: make_local(a, ap)) - -@util.callonce -def add_repo_command(command_group): - """ - Add repo to the subcommand group - @param command_group the subparser group object - """ - repo_arg_parser = command_group.add_parser('repo') - add_repo_args(repo_arg_parser) - repo_arg_parser.set_defaults(func=lambda a, ap: make_repo(a, ap)) - -@util.callonce -def add_chill_command(command_group): - """ - Add chill-testcase to the subcommand group - @param command_group The subparser group object - """ - chill_arg_parser = command_group.add_parser('chill-testcase') - add_chill_run_args(chill_arg_parser) - add_chill_common_args(chill_arg_parser) - chill_arg_parser.set_defaults(func=lambda a, ap: [make_runchill_testcase(a)]) - -@util.callonce -def add_buildchill_command(command_group): - """ - Add build-chill-testcase to the subcommand group - @param command_group The subparser group object - """ - buildchill_arg_parser = command_group.add_parser('build-chill-testcase') - add_chill_common_args(buildchill_arg_parser) - add_chill_build_args(buildchill_arg_parser) - buildchill_arg_parser.set_defaults(func=lambda a, ap: [make_buildchill_testcase(a)]) - -@util.callonce -def add_batch_args(arg_parser): - """ - Command line arguments for the batch file command - @param arg_parser The ArgumentParser object - """ - arg_parser.add_argument('batch_file', help='Batch file', metavar='batch-filename') - -@util.callonce -def add_batch_command(command_group): - """ - Add batch command to the subcommand group - @param command_group The subparser group object - """ - batch_arg_parser = command_group.add_parser('batch') - add_batch_args(batch_arg_parser) - batch_arg_parser.set_defaults(func=make_batch_testcaselist) - -@util.callonce -def add_commands(arg_parser): - """ - Add the subcommand group - @param arg_parser The ArgumentParser object - """ - command_group = arg_parser.add_subparsers(title='commands') - add_local_command(command_group) - #add_repo_command(command_group) - add_chill_command(command_group) - add_buildchill_command(command_group) - add_batch_command(command_group) - -@util.callonce -def add_global_args(arg_parser): - """ - Add arguments that are used for most subcommands - @param arg_parser The ArgumentParser object - """ - arg_parser.add_argument('-w', '--working-dir', dest='wd', default=os.getcwd(), help='The working directory. (Defaults to the current directory)', metavar='working-directory') - arg_parser.add_argument('-R', '--rose-home', dest='rose_dir', default=os.getenv('ROSEHOME'), help='Rose home directory. (Defaults to ROSEHOME)', metavar='rose-home') - arg_parser.add_argument('-C', '--chill-home', dest='chill_dir', default=os.path.join(os.getcwd(), '..'), help='Chill home directory. (Defaults to CHILLHOME)', metavar='chill-home') - arg_parser.add_argument('-b', '--binary-dir', dest='bin_dir', default=os.path.join(os.getcwd(), '..'), help='Binary directory.', metavar='bin-dir') - -@util.callonce -def make_argparser(): - """ - Create the argument parser. - """ - arg_parser = argparse.ArgumentParser( - prog='python -m testchill', - description=textwrap.dedent('''\ - - To test a local working copy of chill (from the development branch): - -------------------------------------------------------------------- - - Run `python -m testchill local` - - '''), - epilog='EPILOG', - formatter_class=argparse.RawDescriptionHelpFormatter) - - add_global_args(arg_parser) - add_commands(arg_parser) - - # ... - - return arg_parser - -def args_to_tclist(args=sys.argv[1:], arg_parser=make_argparser(), argsns=None, **kwargs): - """ - Parse one line and return a list of test cases. - @params args Raw arguments to be passed to the ArgumentParser object (defaults to sys.args[1:]) - @params arg_parser The ArgumentParser object (defaults to an ArgumentParser returned by make_argparser()) - @params argsns The top level argument namespace (defaults to None) - """ - if not argsns is None: # if an argsns is given, - argsns = util.copy(argsns, exclude=['func']) # make a shallow copy, (excluding func) - argsns = arg_parser.parse_args(args, namespace=argsns) - for k,v in kwargs.items(): - setattr(argsns, k, v) - return list(argsns.func(argsns, arg_parser)) - -@util.callonce -def main(): - coverage = gcov.GcovSet() - results = list(test.run(args_to_tclist(coverage_set=coverage))) - test.pretty_print_results(results) - util.rmtemp() - - with open('coverage.pickle', 'wb') as f: - pickle.dump(coverage, f, 2) - with open('testresults.pickle', 'wb') as f: - pickle.dump(results, f, 2) - - if any(s.failed() or s.errored() for s in results): - sys.exit(1) - -if __name__ == '__main__': - main() - diff --git a/test-chill/testchill/_cpp_validate_env.py b/test-chill/testchill/_cpp_validate_env.py deleted file mode 100644 index 9ef5a71..0000000 --- a/test-chill/testchill/_cpp_validate_env.py +++ /dev/null @@ -1,654 +0,0 @@ -import ast as _pyast -import collections as _pycollections -import functools as _pyfunctools -import itertools as _pyitertools -import random as _pyrandom -import struct as _pystruct -import types as _pytypes - -from . import util as _chill_util - -_pylambdatype = _pycollections.namedtuple('LambdaType', ['paramtypes','exprtype']) -_pyarraytype = _pycollections.namedtuple('ArrayType', ['dimensions','basetype']) - -_runtime_globals = dict({ - '_pyitertools':_pyitertools, - '_pyrandom':_pyrandom - }) - -def _evalexpr(expr, target_type, bindings): - glbls = dict(bindings) - glbls.update(_runtime_globals) - if target_type is None: - pytype = None - else: - pytype = target_type.getpytype() - expr = _pyast.Expression(expr.compile_expr(pytype)) - expr = _pyast.fix_missing_locations(expr) - return eval(compile(expr, '<string>', 'eval'), glbls) - -def _addbindings(expr, binding_frame): - if hasattr(expr, 'binding_stack'): - expr.binding_stack = [binding_frame] + expr.binding_stack - return expr - - -class _TreeNode(object): - def print_tree(self, stream=None, indent=0): - strname = type(self).__name__ - stream.write(strname + ':\n') - indent += 2 - for k,v in vars(self).items(): - if isinstance(v, _TreeNode): - stream.write(('{}{}:'.format(' '*indent, k))) - v.print_tree(stream, indent + len(k)) - elif isinstance(v, list): - stream.write(('{}{}: [\n'.format(' '*indent, k))) - for itm in v: - if isinstance(itm, _TreeNode): - stream.write(' '*indent) - itm.print_tree(stream, indent + len(k) + 1) - else: - stream.write('{}{}\n'.format(' '*(indent + 1), str(itm))) - else: - stream.write(('{}{}: {}\n'.format(' '*indent, k, str(v)))) - -class _CppType(_TreeNode): - def __init__(self): - pass - - def __repr__(self): - return "{}".format(str(self)) - - def statictype(self, bindings): - return self - - def formatdata(self, data): - raise NotImplementedError - - def get_cdecl_stmt(self, param_name): - raise NotImplementedError - - def get_cread_stmt(self, param_name, istream_name, dims): - raise NotImplementedError - - def get_cwrite_stmt(self, param_name, ostream_name, dims): - raise NotImplementedError - - def getfreevars(self, glbls): - raise NotImplementedError - - -class _CppPrimitiveType(_CppType): - _bycppname = { - 'char': ('char', 'c', 1, False, False, True, False), - 'signed char': ('signed char', 'b', 1, True, False, False, False), - 'unsigned char': ('unsigned char', 'B', 1, True, False, False, False), - 'short': ('short', 'h', 2, True, False, False, True), - 'unsigned short': ('unsigned short', 'H', 2, True, False, False, False), - 'int': ('int', 'i', 4, True, False, False, True), - 'unsigned int': ('unsigned int', 'I', 4, True, False, False, False), - 'long': ('long', 'l', 4, True, False, False, True), - 'unsigned long': ('unsigned long', 'L', 4, True, False, False, False), - 'long long': ('long long', 'q', 8, True, False, False, True), - 'unsigned long long': ('unsigned long long', 'Q', 8, True, False, False, False), - 'float': ('float', 'f', 4, False, True, False, True), - 'double': ('double', 'd', 8, False, True, False, True) - } - def __init__(self, cppname, structfmt, size, isint, isfloat, ischar, issigned): - _CppType.__init__(self) - self.cppname = cppname - self.size = size - self.size_expr = 'sizeof(' + cppname + ')' - self.structfmt = structfmt - self.isint = isint - self.isfloat = isfloat - self.ischar = ischar - self.issigned = issigned - - @staticmethod - def get_from_cppname(cppname): - return _CppPrimitiveType(*_CppPrimitiveType._bycppname[cppname]) - - def getfreevars(self, glbls): - return set() - - def getpytype(self): - if self.ischar: - return str - elif self.isint: - return int - elif self.isfloat: - return float - - def __str__(self): - return self.cppname - - def formatdata(self, data): - return [1], _pystruct.pack(self.structfmt, data) - - def get_cdecl_stmt(self, param_name): - return '{} {};'.format(self.cppname, param_name) - - def get_cread_stmt(self, param_name, istream_name, dims): - return '{}.read((const char*)&{}, {});'.format(istream_name, param_name, self.size_expr) - - def get_cwrite_stmt(self, param_name, ostream_name, dims): - return '{}.write((const char*)&{}, {});'.format(ostream_name, param_name, self.size_expr) - - -class _CppVoidType(_CppType): - def __init__(self): - self.cppname = 'void' - - def getfreevars(self, glbls): - return set() - - def getpytype(self): - return type(None) - - def __str__(self): - return 'void' - - -class _CppArrayType(_CppType): - def __init__(self, basetype, dims=[None]): - _CppType.__init__(self) - self.basetype = basetype - self.dimensions = dims - - def getfreevars(self, glbls): - freevars = self.basetype.getfreevars(glbls) - for fv in iter(d.getfreevars(glbls) for d in self.dimensions if hasattr(d, 'getfreevars')): - freevars = freevars | fv - return freevars - - def getpytype(self): - return _pyarraytype(self.dimensions, self.basetype.getpytype()) - - def __str__(self): - return '{}[{}]'.format(str(self.basetype), ']['.join(map(str,self.dimensions))) - - def statictype(self, bindings): - dim_list = list() - for dim in self.dimensions: - if dim is None: - dim_list.append(None) - else: - dim_list.append(_evalexpr(dim, _CppPrimitiveType.get_from_cppname('int'), bindings)) - return _CppArrayType(self.basetype.statictype(bindings), dim_list) - - def _formatdata_array(self, unit_length, data): - read_length = 0 - if _chill_util.python_version_major == 2: - read_data = '' - else: - read_data = bytes() - while read_length < len(data): - for i in range(unit_length): - _, b = self.basetype.formatdata(data[read_length+i]) - read_data += b - read_length += unit_length - return read_data - - def formatdata(self, data): - prod = lambda l: _pyfunctools.reduce(lambda a,v: a*v, l, 1) - if self.dimensions[0] is None: - return self.dimensions, self._formatdata_array(prod(self.dimensions[1:]), data) - else: - return self.dimensions, self._formatdata_array(prod(self.dimensions), data) - - def get_cdecl_stmt(self, param_name): - return '{} {}[{}];'.format(str(self.basetype), param_name, ']['.join(map(str,self.dimensions))) - - def get_cread_stmt(self, param_name, istream_name, dims): - length = _pyfunctools.reduce(lambda a,v: a*v, self.dimensions) - #TODO: use dims - if isinstance(self.basetype, _CppPrimitiveType): - size_expr = '{}*{}'.format(length, self.basetype.size_expr) - return '{}.read((char*){}, {});'.format(istream_name, param_name, size_expr) - else: - raise NotImplementedError - - def get_cwrite_stmt(self, param_name, ostream_name, dims): - length = _pyfunctools.reduce(lambda a,v: a*v, self.dimensions) - #TODO: use dims - if isinstance(self.basetype, _CppPrimitiveType): - size_expr = '{}*{}'.format(length, self.basetype.size_expr) - return '{}.write((char*){}, {});'.format(ostream_name, param_name, size_expr) - else: - raise NotImplementedError - - -class _CppPointerType(_CppType): - def __init__(self, basetype): - _CppType.__init__(self) - self.basetype = basetype - - def getfreevars(self, glbls): - return self.basetype.getfreevars(glbls) - - def getpytype(self): - return self.basetype.getpytype() - - def __str__(self): - return '{}*'.format(str(self.basetype)) - - def statictype(self, bindings): - return _CppPointerType(self.basetype.statictype(bindings)) - - def formatdata(self, data): - if isinstance(data, list): - if _chill_util.python_version_major == 2: - read_data = '' - else: - read_data = bytes() - for data_item in data: - next_dims, b = self.basetype.formatdata(data_item) - read_data += b - return [len(data)] + next_dims, read_data - else: - dims, fmt_data = self.basetype.formatdata(data) - return [1] + dims, fmt_data - - -class _CppReferenceType(_CppType): - def __init__(self, basetype): - _CppType.__init__(self) - self.basetype = basetype - - def getfreevars(self, glbls): - return self.basetype.getfreevars(glbls) - - def getpytype(self): - return self.basetype.getpytype() - - def __str__(self): - return '{}&'.format(str(self.basetype)) - - def statictype(self, bindings): - return _CppReferenceType(self.basetype.statictype(bindings)) - - def formatdata(self, data): - dims, fmt_data = self.basetype.formatdata(data) - return dims, fmt_data - - -class _Parameter(_TreeNode): - def __init__(self, name, cpptype, direction, init_expr=None): - self.name = name - self.direction = direction - self.cpptype = cpptype - self.init_expr = init_expr - self._generated = None - - @staticmethod - def order_by_freevars(param_list, glbls=set()): - defined_names = set() - parameter_names = set(p.name for p in param_list) - param_queue = _pycollections.deque(param_list) - while len(param_queue): - param = param_queue.popleft() - freevars = (parameter_names & param.getfreevars(glbls)) - defined_names - if not len(freevars): - defined_names.add(param.name) - yield param - else: - param_queue.append(param) - - def getfreevars(self, glbls=set()): - freevars = set() - if self.init_expr is not None: - freevars = freevars | self.init_expr.getfreevars(glbls) - freevars = freevars | self.cpptype.getfreevars(glbls) - return freevars - - def generatedata(self, bindings=dict()): - if self._generated is None: - if self.init_expr is None: - py_data = None - else: - py_data = _evalexpr(self.init_expr, self.cpptype, bindings) - static_type = self.cpptype.statictype(bindings) - dims, data = static_type.formatdata(py_data) - self._generated = (self.name, static_type, dims, data) - return self.name, static_type, dims, data - else: - return self._generated - - -class _Procedure(_TreeNode): - def __init__(self, name, rtype, parameters): - self.name = name - self.rtype = rtype - self.parameters = parameters - self.binding_stack = [] - self._bindings = None - self._params_orderd = None - self._invoke_str = '{}({});'.format(self.name, ','.join([p.name for p in parameters])) - - def _order_params(self): - if not self._params_orderd: - self._params_orderd = list(_Parameter.order_by_freevars(self.parameters)) - - def _compute_bindings(self, global_bindings): - local_bindings = dict(global_bindings) - if self._bindings is None: - new_bindings = dict() - for binding_frame in self.binding_stack: - for name, (ctype, expr) in binding_frame.items(): - value = _evalexpr(expr, ctype, local_bindings) - new_bindings[name] = value - local_bindings[name] = value - self._bindings = new_bindings - local_bindings.update(self._bindings) - return local_bindings - - def generatedata(self, direction_list, global_bindings=None): - self._order_params() - if global_bindings is None: - global_bindings = dict() - bindings = self._compute_bindings(global_bindings) - for param in (p for p in self._params_orderd if p.direction in direction_list): - p_name, p_statictype, p_dims, p_data = param.generatedata(bindings) - #TODO: add binding - yield p_name, p_statictype, p_dims, p_data - - def generatedecls(self, bindings): - for p_name, p_statictype, p_dims, p_data in self.generatedata(['in','out','inout'], bindings): - yield p_statictype.get_cdecl_stmt(p_name) - #for p_name, p_statictype, p_dims, p_data in self.generatedata('out', bindings): - # yield p_statictype.get_cdecl_stmt(p_name) - - def generatereads(self, direction_list, stream, bindings): - for p_name, p_statictype, p_dims, p_data in self.generatedata(direction_list, bindings): - yield p_statictype.get_cread_stmt(p_name, stream, p_dims) - - def generatewrites(self, stream, bindings): - for p_name, p_statictype, p_dims, p_data in self.generatedata(['inout', 'out'], bindings): - yield p_statictype.get_cwrite_stmt(p_name, stream, p_dims) - - def getinvokestr(self): - return self._invoke_str - - -class _Expr(_TreeNode): - def __init__(self): - pass - - def getfreevars(self, glbls): - raise NotImplementedError - - def compile_to_lambda(self, glbls, target_type): - args = _pyast.arguments(list(_pyast.Name(n, _pyast.Param()) for n in self.getfreevars(self, glbls)), None, None, []) - expr = _pyast.Expression(_pyast.Lambda(args, self.compile_expr(target_type))) - expr = _pyast.fix_missing_locations(expr) - return eval(compile(expr, '<string>', 'eval')) - - def compile_expr(self, target_type): - raise NotImplementedError - - -class _ConstantExpr(_Expr): - def __init__(self, value): - self.value = value - - def compile_expr(self, target_type): - if target_type is None: - return _pyast.parse(self.value, '<string>', 'eval').body - elif target_type == chr: - return _pyast.Str(chr(self.value)) - elif target_type == int: - return _pyast.Num(int(self.value)) - elif target_type == str: - return _pyast.Str(str(self.value)) - elif target_type == float: - return _pyast.Num(float(self.value)) - - def getfreevars(self, glbls): - return set() - - def __str__(self): - return self.value - - -class _NameExpr(_Expr): - def __init__(self, name): - self.name = name - - def compile_expr(self, target_type): - return _pyast.Name(self.name, _pyast.Load()) - - def getfreevars(self, glbls): - if self.name not in glbls: - return set([self.name]) - else: - return set() - - def __str__(self): - return self.name - - -class _AttributeExpr(_Expr): - def __init__(self, expr, name): - self.expr = expr - self.name = name - - def compile_expr(self, target_type): - return _pyast.Attribute( - self.expr.compile_expr(None), - self.name, - _pyast.Load()) - - def getfreevars(self, glbls): - return self.expr.getfreevars(glbls) - - def __str__(self): - return '{}.{}'.format(str(self.expr), self.name) - - -class _BinExpr(_Expr): - _optypes = { - '+': _pyast.Add, - '-': _pyast.Sub, - '*': _pyast.Mult, - '**': _pyast.Pow, - '/': _pyast.Div - } - def __init__(self, left, op, right): - self.left = left - self.right = right - self.op = op - - def compile_expr(self, target_type): - return _pyast.BinOp( - self.left.compile_expr(target_type), - _BinExpr._optypes[self.op](), - self.right.compile_expr(target_type)) - - def getfreevars(self, glbls): - return self.left.getfreevars(glbls) | self.right.getfreevars(glbls) - - def __str__(self): - return '({}{}{})'.format(str(self.left),self.op,str(self.right)) - - -class _UnaryExpr(_Expr): - _optypes = { - '-': _pyast.USub - } - def __init__(self, op, expr): - self.op = op - self.expr = expr - - def compile_expr(self, target_type): - return _pyast.UnaryOp( - _UnaryExpr._optypes[self.op](), - self.expr.compile_expr(target_type)) - - def getfreevars(self, glbls): - return self.expr.getfreevars(glbls) - - def __str__(self): - return '({}{})'.format(self.op, str(self.expr)) - - -class _LambdaExpr(_Expr): - def __init__(self, params, expr): - self.params = params - self.expr = expr - - def compile_expr(self, target_type): - if target_type is None: - exprtype = None - else: - assert hasattr(target_type, 'paramtypes') - assert hasattr(target_type, 'exprtype') - exprtype = target_type.exprtype - if _chill_util.python_version_major == 2: - return _pyast.Lambda( - _pyast.arguments([_pyast.Name(p, _pyast.Param()) for p in self.params], None, None, []), - self.expr.compile_expr(exprtype)) - else: - return _pyast.Lambda( - _pyast.arguments([_pyast.arg(p, None) for p in self.params], None, None, [], None, None, [], []), - self.expr.compile_expr(exprtype)) - - def getfreevars(self, glbls): - new_glbls = set(glbls) - new_glbls = new_glbls | set(self.params) - return self.expr.getfreevars(new_glbls) - - def __str__(self): - return 'lambda {}:{}'.format(','.join(map(str,self.params)), str(self.expr)) - - -class _InvokeExpr(_Expr): - def __init__(self, func, parameters): - self.func = func - self.parameters = parameters - - def compile_expr(self, target_type): - if target_type is None: - lt = None - else: - lt = _pylambdatype([None for p in self.parameters], target_type) - return _pyast.Call( - self.func.compile_expr(lt), - [p.compile_expr(None) for p in self.parameters], - [], - None, - None) - - def getfreevars(self, glbls): - return set( - self.func.getfreevars(glbls) | - _pyfunctools.reduce(lambda a,v: a | v.getfreevars(glbls), self.parameters, set())) - - def __str__(self): - return '{}({})'.format(str(self.func),','.join(map(str,self.parameters))) - - -class _Generator(_Expr): - def __init__(self): - _Expr.__init__(self) - - -class _MatrixGenerator(_Generator): - def __init__(self, dims, genexpr): - self.dimensions = dims - self.genexpr = genexpr - - def _compile_dims(self, target_type): - if hasattr(target_type, 'dimensions'): - dim_exprs = list() - assert len(target_type.dimensions) == len(self.dimensions) - for i, d in enumerate(target_type.dimensions): - if d is None: - d = self.dimensions[i] - dim_exprs += [d.compile_expr(int)] - else: - dim_exprs = [d.compile_expr(int) for d in self.dimensions] - return _pyast.List(dim_exprs, _pyast.Load()) - - def _lambda_type(self, target_type): - if hasattr(target_type, 'dimensions'): - return _pylambdatype([int for d in target_type.dimensions], target_type.basetype) - else: - return _pylambdatype([int for d in self.dimensions], target_type) - - def compile_expr(self, target_type): - assert target_type is not None - dims = self._compile_dims(target_type) - ltype = self._lambda_type(target_type) - - #def array(func,dims): - # return [func(*d) for d in itertools.product(*(map(range,dims))] - elt_expr = _pyast.Call(self.genexpr.compile_expr(ltype), [], [], _pyast.Name('_d', _pyast.Load()), None) # func(*d) - # elt_expr = _pyast.Call(_pyast.Name('tuple', _pyast.Load()), [_pyast.Name('_d', _pyast.Load()), elt_expr], [], None, None) # tuple(d, func(*d)) - pdt_expr = _pyast.Attribute(_pyast.Name('_pyitertools', _pyast.Load()), 'product', _pyast.Load()) # itertools.product - itr_expr = _pyast.Call(_pyast.Name('map', _pyast.Load()), [_pyast.Name('range', _pyast.Load()), dims], [], None, None) # map(range,dims) - itr_expr = _pyast.Call(pdt_expr, [], [], itr_expr, None) # itertools.product(*(map(range,dims))) - return _pyast.ListComp( - elt_expr, - [_pyast.comprehension(_pyast.Name('_d', _pyast.Store()), itr_expr, [])]) - - def getfreevars(self, glbls): - return set( - self.genexpr.getfreevars(glbls) | - _pyfunctools.reduce(lambda a,v: a | v.getfreevars(glbls), filter(lambda x: x is not None, self.dimensions), set())) - - def __str__(self): - return 'matrix([{}],{})'.format(','.join(map(str,self.dimensions)),str(self.genexpr)) - - -class _RandomExpr(_Expr): - def __init__(self, minexpr, maxexpr): - self.minexpr = minexpr - self.maxexpr = maxexpr - self.expr = _BinExpr( - _BinExpr( - _InvokeExpr(_AttributeExpr(_NameExpr('_pyrandom'),'random'),[]), - '*', - _BinExpr(maxexpr, '-', minexpr)), - '+', - minexpr) - - def getfreevars(self, glbls): - return self.minexpr.getfreevars(glbls) | self.maxexpr.getfreevars(glbls) - - def compile_expr(self, target_type): - if target_type == int: - return _pyast.Call(_pyast.Name('int', _pyast.Load()),[self.expr.compile_expr(float)],[],None,None) - elif target_type == float: - return self.expr.compile_expr(target_type) - elif target_type is None: - return self.expr.compile_expr(None) - assert False - - def __str__(self): - return 'random({},{})'.format(str(self.minexpr),str(self.maxexpr)) - - -### What to import from * ### -addbindings = _addbindings - -CppType = _CppType -CppPrimitiveType = _CppPrimitiveType -CppVoidType = _CppVoidType -CppArrayType = _CppArrayType -CppPointerType = _CppPointerType - -ConstantExpr = _ConstantExpr -NameExpr = _NameExpr -AttributeExpr = _AttributeExpr -BinExpr = _BinExpr -UnaryExpr = _UnaryExpr -LambdaExpr = _LambdaExpr -InvokeExpr = _InvokeExpr -MatrixGenerator = _MatrixGenerator -RandomExpr = _RandomExpr - -Procedure = _Procedure -Parameter = _Parameter - diff --git a/test-chill/testchill/_extract.py b/test-chill/testchill/_extract.py deleted file mode 100644 index f6984ac..0000000 --- a/test-chill/testchill/_extract.py +++ /dev/null @@ -1,98 +0,0 @@ -import collections -import os -import os.path -import itertools -import re - -from . import util - -if util.python_version_major == 2: - from HTMLParser import HTMLParser -else: - from html.parser import HTMLParser - -class _TagExtractor(HTMLParser): - _comment_style_expr = { - 'c': [('/(/)+',r'[\n]'),(r'/\*',r'\*/')], - 'cc': [('/(/)+',r'[\n]'),(r'/\*',r'\*/')], - 'cpp': [('/(/)+',r'[\n]'),(r'/\*',r'\*/')], - 'h': [('/(/)+',r'[\n]'),(r'/\*',r'\*/')], - 'hh': [('/(/)+',r'[\n]'),(r'/\*',r'\*/')], - 'hpp': [('/(/)+',r'[\n]'),(r'/\*',r'\*/')], - 'py': [('#+',r'[\n]'),('\'\'\'',),('"""',)], - 'script': [('#+',r'[\n]')], - 'lua': [(r'--\[\[',r'\]\]--')] - } - - def __init__(self, tagname): - HTMLParser.__init__(self) - self.tagname = tagname - self._readin = False - self._value = '' - - def handle_starttag(self, tag, attrs): - if tag == self.tagname: - self._readin = True - self._attrs = dict(attrs) - - def handle_endtag(self, tag): - if tag == self.tagname: - self._readin = False - self._tag_list.append((self._value, self._attrs)) - self._value = '' - - def handle_data(self, txt): - if self._readin: - self._value += txt - - @classmethod - def _parse(cls, tagname, txt): - reader = cls(tagname) - reader._readin = False - reader._value = '' - reader._tag_list = [] - reader.feed(txt) - return reader._tag_list - - @classmethod - def _get_commentstyles(cls, ext): - for comment_style in cls._comment_style_expr[ext]: - if len(comment_style) == 1: - start_expr = comment_style[0] - end_expr = comment_style[0] - elif len(comment_style) == 2: - start_expr = comment_style[0] - end_expr = comment_style[1] - yield start_expr, end_expr - - @classmethod - def _commented(cls, txt, ext): - comment_spans = list() - for start_expr, end_expr in cls._get_commentstyles(ext): - pos = 0 - while pos < len(txt): - start_match = re.search(start_expr, txt[pos:]) - if start_match: - start_pos = pos + start_match.end() - end_match = re.search(end_expr, txt[start_pos:]) - if end_match: - end_pos = start_pos + end_match.start() - pos = start_pos + end_match.end() - else: - end_pos = len(txt) - pos = end_pos - comment_spans.append((start_pos, end_pos)) - else: - break - for span in sorted(comment_spans, key=lambda s: s[0]): - yield txt[span[0]:span[1]] - - @classmethod - def extract_tag(cls, tagname, filename, wd=os.getcwd()): - with open(os.path.join(wd, filename), 'r') as f: - txt = f.read() - ext = filename.split('.')[-1] - return cls._parse(tagname, '\n'.join(cls._commented(txt, ext))) - -extract_tag = _TagExtractor.extract_tag - diff --git a/test-chill/testchill/chill.py b/test-chill/testchill/chill.py deleted file mode 100644 index b6d39cf..0000000 --- a/test-chill/testchill/chill.py +++ /dev/null @@ -1,326 +0,0 @@ -#TODO: Re-Document -#TODO: highlight test implementation hooks - -import os -import os.path - -from . import gcov -from . import test -from . import util -from . import cpp_validate - - -class ChillConfig(object): - def __init__(self, chill_dir=None, bin_dir=None, build_cuda=False, script_lang=None): - self.build_cuda = build_cuda - self.script_lang = script_lang - self.chill_dir = chill_dir - self.bin_dir = bin_dir - if self.script_lang is None: - self.script_lang = self.default_script_lang() - - def default_script_lang(self): - return 'python' - - def _buildfunc(self, cc, link=True): - if not link: - compile_args = ['-c -Wuninitialized'] - elif link and cc == 'nvcc': - compile_args = ['-L/usr/local/cuda/lib64/lib', '-lcuda', '-lcudart', '-lstdc++', '-lrt', '-Wuninitialized'] - else: - compile_args = ['-lstdc++', '-lrt', '-Wuninitialized'] - - def build(src, dest, args=[], defines={}, wd=None): - if wd is None: - wd = os.path.dirname(src) - args += ['-D{}={}'.format(k,v) for k, v in defines.items()] - dest = os.path.join(wd, dest) - stdout = util.shell(cc, args + [src, '-o', dest] + compile_args, wd=wd) - return dest, stdout - return build - - def compile_src_func(self): - return self._buildfunc('gcc', False) - - def compile_gensrc_func(self): - if self.build_cuda: - return self._buildfunc('nvcc', False) - else: - return self._buildfunc('gcc', False) - - def build_src_func(self): - return self._buildfunc('gcc') - - def build_gensrc_func(self): - if self.build_cuda: - return self._buildfunc('nvcc') - else: - return self._buildfunc('gcc') - - @property - def config_args(self): - args = [] - if self.build_cuda: - args += ['--enable-cuda'] - if self.script_lang is not None: - args += ['--with-' + self.script_lang] - return args - - @property - def buildname(self): - if self.build_cuda: - return 'cudachill' - else: - return 'chill' - - @property - def name(self): - if self.buildname == 'cudachill': - return 'cuda-chill-' + self.script_lang - else: - return 'chill-' + self.script_lang - - @staticmethod - def ext_to_script_lang(ext): - return {'script':'script', 'lua':'lua', 'py':'python'}[ext] - - @staticmethod - def configs(chill_dir, bin_dir, build_cuda=None, script_lang=None): - all_configs = [ - (False, 'script'), - (False, 'lua'), - (False, 'python'), - (True, 'lua'), - (True, 'python')] - - pred_list = [lambda x: True] - if not build_cuda is None: - pred_list += [lambda x: x[0] == build_cuda] - if not script_lang is None: - pred_list += [lambda x: x[1] == script_lang] - - cond = lambda x: all(p(x) for p in pred_list) - - return iter(ChillConfig(chill_dir, bin_dir, *conf) for conf in filter(cond, all_configs)) - - -# - - # -# - Test case for building chill - # -# - - # -class BuildChillTestCase(test.TestCase): - """ - Test case for building chill. - """ - - default_options = { - 'coverage': False # compile for coverage - } - - def __init__(self, config, options={}, coverage_set=None): - """ - @param config chill configuration object - @param options options for building chill and testing the build process - @param coverage_set GcovSet object to record coverage - """ - assert isinstance(config, ChillConfig) - if config.script_lang == None: - config.script_lang = config.default_script_lang() - self.config = config - super(BuildChillTestCase,self).__init__(self.config.name) - self._set_options(options, coverage_set) - - def _set_options(self, options, coverage_set): - self.options = dict(BuildChillTestCase.default_options) - self.options.update(options) - - if self.options['coverage']: - coverage_set.addprogram(self.config.name, self.config.chill_dir) - - def setUp(self): - """ - Called before run, outside of the context of a test case - """ - # clean up any coverage files from a previous build - util.shell('rm', ['-f', '*.gcno'], wd=self.config.chill_dir) - util.shell('rm', ['-f', '*.gcov'], wd=self.config.chill_dir) - util.shell('rm', ['-f', '*.gcda'], wd=self.config.chill_dir) - - util.shell('make clean', wd=self.config.chill_dir) - - def run(self): - """ - Build chill - """ - util.shell('make', ['distclean'], wd=self.config.chill_dir) - util.shell('./configure', self.config.config_args, wd=self.config.chill_dir) - util.shell('make', [], wd=self.config.chill_dir) - - #util.shell('make', ['clean'], wd=self.config.chill_dir) - #util.shell('make', ['veryclean'], wd=self.config.chill_dir) - #util.shell('make', [depend_target] + [self.build_args], env=self.build_env, wd=self.config.chill_dir) - #util.shell('make', [target] + [self.build_args], env=self.build_env, wd=self.config.chill_dir) - return self.make_pass() - - def tearDown(self): - """ - Called after run, outside of the context of a test case. - If a binary directory is specified, rename and move the executable there, otherwise, just rename it. - """ - if self.test_result.passed(): - if self.config.bin_dir: - util.shell('mv', [os.path.join(self.config.chill_dir, self.config.buildname), os.path.join(self.config.bin_dir, self.config.name)]) - elif not self.config.buildname == self.config.name: - util.shell('mv', [os.path.join(self.config.chill_dir, self.config.buildname), os.path.join(self.config.chill_dir, self.config.name)]) - - -# - - # -# - Test case for running chill - # -# - - # -class RunChillTestCase(test.SequencialTestCase): - """ - Test case for running and testing chill. - """ - - default_options={ - 'compile-src':True, # Compile original source file - 'run-script':True, # Run chill script - 'compile-gensrc':True, # Compile generated source file - 'check-run-script-stdout':False, # Diff stdout from run_script() against an expected value (from a .stdout file) - 'coverage':False, # Record coverage - - 'fail-compile-src':False, # Expect compile_src to fail (TODO: not implemented) - 'fail-run-script':False, # Expect run_script to fail (TODO: not implemented) - } - - def __init__(self, config, chill_script, chill_src, wd=None, options={}, coverage_set=None): - """ - @param config Chill configuration object - @param chill_script The path to the chill script. - @param chill_src The path to the source file that the script uses. - @param wd The working directory. Where the script will be executed, compiled, and tested. - @param options Additional testing options. - @param coverage_set GcovSet object to record coverage - """ - if config.script_lang == None: - config.script_lang = ChillConfig.ext_to_script_lang(chill_script.split('.')[-1]) - - assert isinstance(config, ChillConfig) - - super(RunChillTestCase,self).__init__(config.name + ':' + os.path.basename(chill_script)) - - self.config = config - self.wd = wd if (wd != None) else os.getcwd() - - self.chill_src_path = os.path.abspath(chill_src) - self.chill_script_path = os.path.abspath(chill_script) - self.chill_bin = os.path.join(self.config.bin_dir, self.config.name) - self.chill_src = os.path.basename(self.chill_src_path) - self.chill_script = os.path.basename(self.chill_script_path) - self.chill_gensrc = self._get_gensrc(self.chill_src) - self.chill_gensrc_path = os.path.join(self.wd, self.chill_gensrc) - - self.compile_src_func = self.config.compile_src_func() - self.compile_gensrc_func = self.config.compile_gensrc_func() - self.build_src_func = self.config.build_src_func() - self.build_gensrc_func = self.config.build_gensrc_func() - - self._set_options(options, coverage_set) - - def _set_options(self, options, coverage_set=None): - self.options = dict(RunChillTestCase.default_options) - self.options.update(options) - - self.out = dict() - self.expected = dict() - - if self.options['compile-src']: - self.add_subtest('compile-src', self.compile_src) - if self.options['run-script']: - self.add_subtest('run-script', self.run_script) - if self.options['compile-gensrc']: - self.add_subtest('compile-generated-src', self.compile_gensrc) - self.add_subtest('check-run-script-validate', self.check_run_script_validate) - if self.options['check-run-script-stdout']: - self.add_subtest('check-run-script-stdout', self.check_run_script_stdout) - with open('.'.join(self.chill_script_path.split('.')[0:-1] + ['stdout']), 'r') as f: - self.expected['run_script.stdout'] = f.read() - self.coverage_set = coverage_set - - def _get_gensrc(self, src): - """ - The name of the generated source file. - """ - if not self.config.build_cuda: - return 'rose_' + src - else: - return 'rose_' + '.'.join(src.split('.')[0:-1]) + '.cu' - - def setUp(self): - """ - Called before any tests are performed. Moves source and script files into the working directory - and removes any gcov data files - """ - util.shell('cp', [self.chill_src_path, self.chill_src], wd=self.wd) - util.shell('cp', [self.chill_script_path, self.chill_script], wd=self.wd) - #TODO: check for chill binary - - def tearDown(self): - """ - Called when the test is complete - """ - util.shell('rm', ['-f', self.chill_src], wd=self.wd) - util.shell('rm', ['-f', self.chill_script], wd=self.wd) - util.shell('rm', ['-f', self.chill_gensrc], wd=self.wd) - if self.options['coverage'] and self.coverage_set is not None: - self.coverage_set.addcoverage(self.config.name, self.name) - - # - - # - # - Chill Tests - # - # - - # - - def compile_src(self, tc): - """ - Attempts to compile the source file before any transformation is performed. Fails if gcc fails. - """ - #self.out['compile_src.stdout'] = util.shell('gcc', ['-c', self.chill_src], wd=self.wd) - _, self.out['compile_src.stdout'] = self.compile_src_func(self.chill_src, util.mktemp(), wd=self.wd) - return tc.make_pass() - - def run_script(self, tc): - """ - Attempts to run the script file. Fails if chill exits with a non-zero result. - """ - # look for cudaize.lua for cuda-chill - if self.config.build_cuda and not os.path.exists(os.path.join(self.wd, 'cudaize.lua')): - return test.TestResult.make_error(test.FailedTestResult, tc, reason='cudaize.lua was missing from the working directory.') - self.out['run_script.stdout'] = util.shell(self.chill_bin, [self.chill_script], wd=self.wd) - return tc.make_pass() - - def compile_gensrc(self, tc): - """ - Attempts to compile the generated source file. Fails if gcc fails. - """ - #self.out['compile_gensrc.stdout'] = util.shell('gcc', ['-c', self.chill_gensrc], wd=self.wd) - _, self.out['compile_gensrc.stdout'] = self.compile_gensrc_func(self.chill_gensrc_path, util.mktemp(), wd=self.wd) - return tc.make_pass() - - def check_run_script_validate(self, tc): - """ - Generate test data and run both the original source and generated source against it. - Fail if any test procedure generates different output. - """ - for name, (is_valid, is_faster) in cpp_validate.run_from_src(self.chill_src, self.chill_gensrc, self.build_src_func, self.build_gensrc_func, wd=self.wd): - self.out['check_run_script_validate.{}'.format(name)] = (is_valid, is_faster) - if not is_valid: - return tc.make_fail('test procedure {} returned invalid results.'.format(name)) - return tc.make_pass() - - def check_run_script_stdout(self, tc): - """ - Diff stdout from run_script against an expected stdout - """ - isdiff, diff = util.isdiff(self.out['run_script.stdout'], self.expected['run_script.stdout']) - if isdiff: - return test.TestResult.make_fail(test.FailedTestResult, tc, reason='Diff:\n' + diff) - return tc.make_pass() - diff --git a/test-chill/testchill/cpp_validate.py b/test-chill/testchill/cpp_validate.py deleted file mode 100644 index 5f19a12..0000000 --- a/test-chill/testchill/cpp_validate.py +++ /dev/null @@ -1,165 +0,0 @@ -import collections -import os -import pickle -import re - -from . import util - -_script_parser = None -def _get_script_parser(): - """ - Retrieve the test code generator language parser. - """ - global _script_parser - if _script_parser is None: - with open('testchill/cpp_validate/parser.pickle','rb') as f: - _script_parser = pickle.load(f) - return _script_parser - -def _parse_testproc_python(txt, glbls=None): - """ - Parse text as a python testchill._cpp_validate_env.Procedure object" - @param txt Python code to be parsed. - @param glbls A python global dict. - """ - if glbls is None: - glbls = dict() - exec('import testchill._cpp_validate_env\nfrom testchill._cpp_validate_env import *', None, glbls) - return eval(txt, glbls) - -def _parse_testproc_script(txt, glbls=None): - """ - Parse text as test code generator language. - @param txt Code to be parsed. - @param glbls A python global dict. - """ - parser = _get_script_parser() - proc = list(parser.parse(util.textstream(txt)))[0] - if glbls is None: - from . import _cpp_validate_env - glbls = dict() - return _cpp_validate_env.addbindings(proc, glbls) - else: - return proc - -def _parse_testproc_iter(srcfile, wd=os.getcwd()): - """ - Parse all test procedures from a file. - @param srcfile File path to parse. - @param wd Working directory. - """ - default_attrs = {'lang':'script', 'define':'dict()'} - for txt, parsed_attrs in util.extract_tag('test', srcfile, wd): - attrs = collections.defaultdict(lambda: None) - attrs.update(default_attrs) - attrs.update(parsed_attrs) - if attrs['lang'] == 'python': - yield _parse_testproc_python(txt), attrs - if attrs['lang'] == 'script': - yield _parse_testproc_script(txt), attrs - -#def _compile_gpp(src, dest): -# """ -# Compile a signle C++ source file into an executable object. -# @param src Source file path. -# @param dest Object file path. -# """ -# util.shell('g++', ['-o', dest, src, '-lrt']) - -def _test_time(control_time, test_time): - """ - Determine if test ran faster than control. - @param control_time Time taken by control. - @param test_time Time taken by test. - """ - return control_time > test_time - -def _test_validate(control_dataout_path, test_dataout_path): - """ - Determine if control and test computed the same values. - @param control_dataout_path Path to the file writen by control. - @param test_dataout_path Path to the file writen by test. - """ - with open(control_dataout_path, 'rb') as controlfile: - with open(test_dataout_path, 'rb') as testfile: - return controlfile.read() == testfile.read() - -def _run_test_validate_time(control_obj_path, test_obj_path, datain_path): - control_dataout_path = util.mktemp() - test_dataout_path = util.mktemp() - control_time, = eval(util.shell(os.path.abspath(control_obj_path), [datain_path, control_dataout_path])) - test_time, = eval(util.shell(os.path.abspath(test_obj_path), [datain_path, test_dataout_path])) - return _test_validate(control_dataout_path, test_dataout_path), _test_time(control_time, test_time) - -#def _run_test_validate_time(control_obj_path, test_obj_path, datain_path, wd): - #control_obj_path = '.'.join(control_src_path.split('.')[:-1]) - #test_obj_path = '.'.join(test_src_path.split('.')[:-1]) - - - - #util.set_tempfile(control_obj_path) - #util.set_tempfile(test_obj_path) - #_compile_gpp(control_src_path, control_obj_path) - #_compile_gpp(test_src_path, test_obj_path) - - #test_validate, test_time = _run_test_validate_time(control_obj_path, test_obj_path, datain_path) - #return test_validate, test_time - -def _generate_initial_data(test_proc, srcfile, defines, wd=os.getcwd()): - filename = os.path.join(wd, os.path.basename(srcfile)) + '.data' - with open(filename, 'wb') as f: - for p_name, p_type, p_dims, p_data in test_proc.generatedata(['in', 'inout'], defines): - f.write(p_data) - for p_name, p_type, p_dims, p_data in test_proc.generatedata(['out'], defines): - f.write(p_data) - return filename - -def _format_insertion_dict(test_proc, src_path, defines): - with open(src_path, 'r') as src_file: - return { - 'defines' : '\n'.join(['#define {} {}'.format(k,v) for k,v in defines.items()]), - 'test-proc' : src_file.read(), - 'declarations' : '\n'.join(test_proc.generatedecls(defines)), - 'read-in' : '\n'.join(test_proc.generatereads(['in','inout'], 'datafile_initialize', defines)), - 'read-out' : '\n'.join(test_proc.generatereads(['out'], 'datafile_initialize', defines)), - 'run' : test_proc.getinvokestr(), - 'write-out' : '\n'.join(test_proc.generatewrites('datafile_out', defines)), - } - -def _write_generated_code(test_proc, src_path, defines, dest_filename, wd): - insertion_dict = _format_insertion_dict(test_proc, src_path, defines) - dest_file_path = os.path.join(wd, dest_filename) - with open('testchill/cpp_validate/src/validate.cpp', 'r') as template_file: - with open(dest_file_path, 'w') as destfile: - template_text = template_file.read() - desttext = template_text - for match in re.finditer(r'(?P<indent>[ \t]*)//# (?P<name>[^\s]+)', template_text): - destlines = insertion_dict[match.group('name')].splitlines() - indent = match.group('indent') - match_text = match.group() - repl_text = '\n'.join([indent + line for line in destlines]) - desttext = desttext.replace(match_text, repl_text) - destfile.write(desttext) - return dest_file_path - -def run_from_src(control_src, test_src, build_control_func, build_test_func, wd=os.getcwd()): - control_src_path = os.path.join(wd, control_src) - test_src_path = os.path.join(wd, test_src) - gen_control_obj_path = os.path.join(wd, 'control_obj') - gen_test_obj_path = os.path.join(wd, 'test_obj') - for test_proc, attrs in _parse_testproc_iter(control_src, wd): - defines = eval(attrs['define']) - datafile = _generate_initial_data(test_proc, control_src_path, defines, wd=wd) - gen_control_src = _write_generated_code(test_proc, control_src_path, defines, 'gen_control.cc', wd) - gen_test_src = _write_generated_code(test_proc, test_src_path, defines, 'gen_test.cc', wd) - gen_control_obj, _ = build_control_func(gen_control_src, gen_control_obj_path) - gen_test_obj, _ = build_test_func(gen_test_src, gen_test_obj_path) - util.set_tempfile(gen_control_obj) - util.set_tempfile(gen_test_obj) - yield attrs['name'], _run_test_validate_time(gen_control_obj, gen_test_obj, datafile) - -def parse_defines_iter(src, wd=os.getcwd()): - for txt, attrs in util.extract_tag('test', src, wd): - if 'define' in attrs.keys(): - yield eval(attrs['define']) - diff --git a/test-chill/testchill/cpp_validate/grammar.txt b/test-chill/testchill/cpp_validate/grammar.txt deleted file mode 100644 index fdb8c00..0000000 --- a/test-chill/testchill/cpp_validate/grammar.txt +++ /dev/null @@ -1,124 +0,0 @@ -terminals: - Identifier '[a-zA-Z_][a-zA-Z_0-9]*' - NumericLiteral '[0-9]+(\.[0-9]+)?' - Comment '\#([^\x0a])*' - WS '\s+' -ignore: WS, <NL>, Comment -rules: -<proc-unit> ::= - <with-stmt>:w => w - <proc>:p => p -<with-stmt> ::= - 'with' '{' <with-decl-list-opt>:decls '}' <proc-unit>:p => addbindings(p, dict(decls)) -<with-decl-list-opt> ::= - eps => [] - <with-decl-list>:l => l -<with-decl-list> ::= - <with-decl-list>:l ',' <with-decl>:decl => l + [decl] - <with-decl>:decl => [decl] -<with-decl> ::= - Identifier:name ':' <expr>:e => (name, (None, e)) - <c-type>:ctype Identifier:name ':' <expr>:e => (name, (ctype, e)) - -<proc> ::= - 'procedure' <c-type>:rtype Identifier:name '(' <param-list-opt>:plist ')' - => Procedure(name, rtype, plist) -<c-type> ::= - <c-type>:bt '*' => CppPointerType(bt) - <c-type>:bt <c-array-dim-list>:dims => CppArrayType(bt, dims) - 'void' => CppVoidType() - 'char' => CppPrimitiveType.get_from_cppname('char') - 'signed' 'char' => CppPrimitiveType.get_from_cppname('signed char') - 'unsigned' 'char' => CppPrimitiveType.get_from_cppname('unsigned char') - 'short' => CppPrimitiveType.get_from_cppname('short') - 'unsigned' 'short' => CppPrimitiveType.get_from_cppname('unsigned short') - 'int' => CppPrimitiveType.get_from_cppname('int') - 'unsigned' 'int' => CppPrimitiveType.get_from_cppname('unsigned int') - 'long' => CppPrimitiveType.get_from_cppname('long') - 'unsigned' 'long' => CppPrimitiveType.get_from_cppname('unsigned long') - 'long' 'long' => CppPrimitiveType.get_from_cppname('long long') - 'unsigned' 'long' 'long' => CppPrimitiveType.get_from_cppname('unsigned long long') - 'float' => CppPrimitiveType.get_from_cppname('float') - 'double' => CppPrimitiveType.get_from_cppname('double') -<c-array-dim-list> ::= - <c-array-dim-list>:dlist '[' <expr>:e ']' => dlist + [e] - <c-array-dim-list>:dlist '[' ']' => dlist + [None] - '[' ']' => [None] - '[' <expr>:e ']' => [e] -<param-list-opt> ::= - eps => [] - <param-list>:l => l -<param-list> ::= - <param-list>:l ',' <param>:p => l + [p] - <param>:p => [p] -<param> ::= - <direction>:d <c-type>:t Identifier:name '=' <expr>:e => Parameter(name, t, d, e) - <direction>:d <c-type>:t Identifier:name => Parameter(name, t, d, None) -<direction> ::= - 'in' => 'in' - 'out' => 'out' - 'in' 'out' => 'inout' - 'out' 'in' => 'inout' - eps => 'inout' - - -<expr> ::= - <add-expr>:e => e - 'lambda' <id-list-opt>:params ':' <expr>:e => LambdaExpr(params, e) - 'matrix' '(' <dim-list-expr>:d ',' <expr>:e ')' => MatrixGenerator(d, e) - 'matrix' <named-dim-list-expr>:dims <expr>:e => MatrixGenerator([d[1] for d in dims], LambdaExpr([d[0] for d in dims], e)) -<add-expr> ::= - <add-expr>:l '+' <mul-expr>:r => BinExpr(l, '+', r) - <add-expr>:l '-' <mul-expr>:r => BinExpr(l, '-', r) - <mul-expr>:e => e -<mul-expr> ::= - <mul-expr>:l '*' <prefix-expr>:r => BinExpr(l, '*', r) - <mul-expr>:l '/' <prefix-expr>:r => BinExpr(l, '/', r) - <prefix-expr>:e => e -<prefix-expr> ::= - '-' <prefix-expr>:e => UnaryExpr('-', e) - <postfix-expr>:e => e -<postfix-expr> ::= - <pow-expr>:e => e -<pow-expr> ::= - <term-expr>:l '**' <pow-expr>:r => BinExpr(l, '**', r) - <term-expr>:e => e -<term-expr> ::= - '(' <expr>:e ')' => e - '[' <expr-list-opt>:l ']' => l - Identifier:name => NameExpr(name) - NumericLiteral:num => ConstantExpr(num) - 'random' '(' <expr>:mn ',' <expr>:mx ')' => RandomExpr(mn, mx) - <term-expr>:f '(' <expr-list-opt>:l ')' => InvokeExpr(f, l) - <term-expr>:n '.' Identifier:attr => AttributeExpr(n, attr) -<expr-list-opt> ::= - eps => [] - <expr-list>:l => l -<expr-list> ::= - <expr-list>:l ',' <expr>:e => l + [e] - <expr>:e => [e] -<dim-list-expr> ::= - '[' <dim-expr-list>:l ']' => l -<dim-expr-list> ::= - <dim-expr-list>:l ',' <dim-expr>:e => l + [e] - <dim-expr>:e => [e] -<dim-expr> ::= - eps => None - '*' => None - <expr>:e => e -<id-list-opt> ::= - eps => [] - <id-list>:l => l -<id-list> ::= - <id-list>:l ',' Identifier:ident => l + [ident] - Identifier:ident => [ident] -<named-dim-list-expr> ::= - '[' <named-dim-expr-list>:l ']' => l -<named-dim-expr-list> ::= - <named-dim-expr-list>:l ',' <named-dim-expr>:e => l + [e] - <named-dim-expr>:e => [e] -<named-dim-expr> ::= - Identifier:name => (name, None) - Identifier:name ':' <expr>:e => (name, e) - - diff --git a/test-chill/testchill/cpp_validate/src/validate.cpp b/test-chill/testchill/cpp_validate/src/validate.cpp deleted file mode 100644 index f09009d..0000000 --- a/test-chill/testchill/cpp_validate/src/validate.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include <time.h> -#include <fstream> -#include <cstdio> - -//# defines -//# test-proc - -int main(int argc, char** argv) { - //# declarations - timespec start_time; - timespec end_time; - - std::ifstream datafile_initialize(argv[1]); - //# read-in - //# read-out - datafile_initialize.close(); - - clock_gettime(CLOCK_REALTIME, &start_time); - //# run - clock_gettime(CLOCK_REALTIME, &end_time); - - std::ofstream datafile_out(argv[2]); - //# write-out - datafile_out.close(); - - double time_diff = (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec)/1000000000.0; - std::printf("(%f,)", time_diff); - return 0; -} diff --git a/test-chill/testchill/gcov.py b/test-chill/testchill/gcov.py deleted file mode 100644 index 668c00e..0000000 --- a/test-chill/testchill/gcov.py +++ /dev/null @@ -1,224 +0,0 @@ -from __future__ import print_function -import functools -import itertools -import os -import os.path -import sys - -from . import util - -class GcovFile(object): - def __init__(self, src_file_name, cov_file_path, lines, properties): - """ - @param src_file_name Name of the source file. - @param cov_file_path Full path to the coverage file. - @param lines List of GcovLine objects. - @param properties Properties from the coverage file. - """ - self.src_file_name = src_file_name - self.cov_file_path = cov_file_path - self.lines = lines - self.properties = properties - - @staticmethod - def parse_file(gcov, fname, process=None): - """ - Parse a file into a GcovFile object. - @param gcov Gcov object that tis file is a part of. - @param gname File name. - @param process Process name - """ - util.shell('gcov', [fname], wd=gcov.srcdir) - cov_file_path = os.path.join(gcov.srcdir, fname + '.gcov') - src_file_name = fname - if os.path.exists(cov_file_path): - with open(cov_file_path, 'r') as f: - lines, properties = GcovFile.parse_lines(f.readlines(), process) - return GcovFile(src_file_name, cov_file_path, lines, properties) - else: - return None - - @staticmethod - def parse_lines(str_lines, process): - """ - Parse a string from a coverage file into a list of GcovLine objects. - @param str_lines Full text of a coverage file. - @param process Name of the process that executed the code. - """ - properties = dict() - lines = [] - for line in str_lines: - if line[-1] == '\n': - line = line[0:-1] - pline = line.split(':') - pline = list(map(str.strip, pline[0:2])) + pline[2:] - if pline[1] == '0': - properties[pline[2]] = pline[3].strip() - elif pline[0][0] == '-': - lines.append(GcovLine(int(pline[1]), dict(), ':'.join(pline[2:]))) - elif pline[0][0] == '#': - lines.append(GcovLine(int(pline[1]), {process : 0}, ':'.join(pline[2:]))) - else: - lines.append(GcovLine(int(pline[1]), {process : int(pline[0])}, ':'.join(pline[2:]))) - return lines, properties - - @staticmethod - def union(left, right): - """ - Merge two different coverages of the same file into a single coverage object. - """ - return left | right - - def __or__(self, right): - """ - Merge two different coverages of the same file into a single coverage object. - """ - new_file = self.clone() - new_file.merge(right) - return new_file - - def __ior__(self, right): - """ - Merge two different coverages of the same file into a single coverage object. - """ - self.merge(right) - return self - - def merge(self, other): - """ - Merge another coeverage into self. - """ - assert self.src_file_name == other.src_file_name - GcovLine.merge_lines(self.lines, other.lines) - self.properties.update(other.properties) - - def clone(self): - """ - Create a shallow clone. - """ - return GcovFile(self.src_file_name, self.cov_file_path, list(self.lines), dict(self.properties)) - - -class GcovLine(object): - def __init__(self, lineno, count_by_process, code): - """ - @param lineno Line number. - @param count_by_prcess A dictionary of execution counts by name of the process that executed them. - @param code Source code from this line. - """ - self.lineno = lineno - self.count_by_process = count_by_process - self.code = code - - @staticmethod - def merge_lines(lines, other_lines): - """ - Merge lines from other_line into lines. - """ - for line, other_line in zip(lines, other_lines): - assert line.lineno == other_line.lineno - assert line.code == other_line.code - line.count_by_process.update(other_line.count_by_process) - - def count(self): - """ - The total number of times this line was executed. - """ - runable_list = [l for l in self.count_by_process.values() if l is not None] - if len(runable_list) == 0: - return None - else: - return sum(runable_list) - - def __repr__(self): - return str((self.lineno, self.count_by_process, self.code)) - - -class Gcov(object): - def __init__(self, srcdir): - self.srcdir = srcdir - self.files = dict() - - @staticmethod - def parse(srcdir, process=None): - gcov = Gcov(srcdir) - gcov._append(filter(lambda f: f is not None, map(functools.partial(GcovFile.parse_file, gcov, process=process), - util.filterext(['cc','c','cpp','h','hh'], os.listdir(srcdir))))) - return gcov - - def _append(self, files): - for f in files: - if f.src_file_name in self.files: - self.files[f.src_file_name].merge(f) - else: - self.files[f.src_file_name] = f - - def __or__(self, right): - new_cov = self.clone() - new_cov.merge(right) - return new_cov - - def __ior__(self, right): - self.merge(right) - return self - - @staticmethod - def union(left, right): - return left | right - - def merge(self, other): - self._append(other.files.values()) - - def clone(self): - new_cov = Gcov(self.srcdir) - new_cov._append(iter(f.clone() for f in self.files.values())) - return new_cov - - -class GcovSet(object): - def __init__(self): - self.coverage_by_program = dict() - - def addprogram(self, prog_name, src_dir): - self.coverage_by_program[prog_name] = Gcov(src_dir) - - def addcoverage(self, prog_name, process_name): - cov = self.coverage_by_program[prog_name] - cov.merge(Gcov.parse(cov.srcdir, process_name)) - - #def unexecuted_lines(self): - # covlist = sorted(self.coverage_by_program.values(), key=lambda c: c.srcdir) - # for src, grp in itertools.groupby(covlist, lambda c: c.srcdir): - # files = functools.reduce(lambda a, c: a | c, grp).files.values() - # file_lines = iter((f.src_file_name, iter(l for l in f.lines if l.count() == 0)) for f in files) - # yield src, file_lines - # - #def pretty_print(self, outfile=sys.stdout, width=60, stats=['unexecuted', 'unexecuted.bysrc']): - # print('='*width, file=outfile) - # print(' CODE COVERAGE', file=outfile) - # - # if 'unexecuted' in stats: - # print('='*width, file=outfile) - # print(' unexecuted lines', file=outfile) - # if 'unexecuted.bysrc' in stats: - # for src, file_lines in self.unexecuted_lines(): - # print((src + ':'), file=outfile) - # print('-'*width, file=outfile) - # for src_file_name, lines in file_lines: - # print(' ' + src_file_name + ':', file=outfile) - # for line in lines: - # print("{}:{}".format(str(line.lineno).rjust(5), line.code), file=outfile) - # #print('='*width, file=outfile) - # #print(prog, file=outfile) - # #print('-'*width, file=outfile) - - def _get_coverage_by_file(self): - return functools.reduce(lambda a,b: a|b, self.coverage_by_program.values()).files - - def _get_filenames(self): - return self.coverage_by_file.keys() - - coverage_by_file = property(_get_coverage_by_file) - filenames = property(_get_filenames) - - diff --git a/test-chill/testchill/omega.py b/test-chill/testchill/omega.py deleted file mode 100644 index 962333a..0000000 --- a/test-chill/testchill/omega.py +++ /dev/null @@ -1,29 +0,0 @@ -from . import test -from . import util - - - -class BuildOmegaTestCase(test.TestCase): - def __init__(self, omega_dir, version='dev'): - super(BuildOmegaTestCase, self).__init__(BuildOmegaTestCase.getname(version)) - self.omega_dir = omega_dir - self.version = version - - @staticmethod - def getname(version): - if version == 'release': - return 'omega-release' - else: - return 'omega' - - def setUp(self): - util.shell('make clean', wd=self.omega_dir) - - def tearDown(self): - pass - - def run(self): - util.shell('make depend', wd=self.omega_dir) - util.shell('make', wd=self.omega_dir) - - diff --git a/test-chill/testchill/test.py b/test-chill/testchill/test.py deleted file mode 100644 index c38b98a..0000000 --- a/test-chill/testchill/test.py +++ /dev/null @@ -1,381 +0,0 @@ -from __future__ import print_function -#TODO: test dependencies -#TODO: expected failures -import itertools -import io -import logging -import pprint -import sys -import traceback - -from . import util - - -class TestResult(object): - """ - The base class for all test results. - """ - _pass = 'pass' - _error = 'error' - _fail = 'fail' - _skipped = 'skipped' - - def __init__(self, testcase, status): - self.testcase_name = testcase.name - self.status = status - testcase.setresult(self) - - @staticmethod - def make_pass(result_type, testcase, *args, **kwargs): - """ - Create and return a passing test result of type result_type. - @param result_type A class that extends TestResult - @param testcase The test case that generated the result - @param *args Additional positional arguments to be passed to result_type.__init__ - @param *kwargs Keyword arguments to be passed to result_type.__init__ - """ - return result_type(testcase, TestResult._pass, *args, **kwargs) - - @staticmethod - def make_error(result_type, testcase, *args, **kwargs): - """ - Create and return a errored test result of type result_type. - @param result_type A class that extends TestResult - @param testcase The test case that generated the result - @param *args Additional positional arguments to be passed to result_type.__init__ - @param *kwargs Keyword arguments to be passed to result_type.__init__ - """ - return result_type(testcase, TestResult._error, *args, **kwargs) - - @staticmethod - def make_fail(result_type, testcase, *args, **kwargs): - """ - Create and return a failed test result of type result_type. - @param result_type A class that extends TestResult - @param testcase The test case that generated the result - @param *args Additional positional arguments to be passed to result_type.__init__ - @param *kwargs Keyword arguments to be passed to result_type.__init__ - """ - return result_type(testcase, TestResult._fail, *args, **kwargs) - - @staticmethod - def make_skipped(result_type, testcase, *args, **kwargs): - """ - Create and return a skipped test result of type result_type. - @param result_type A class that extends TestResult - @param testcase The test case that generated the result - @param *args Additional positional arguments to be passed to result_type.__init__ - @param *kwargs Keyword arguments to be passed to result_type.__init__ - """ - return result_type(testcase, TestResult._skipped, *args, **kwargs) - - def passed(self): - """ Return true iff the testcase passed. """ - return self.status == TestResult._pass - - def errored(self): - """ Return true iff the testcase passed. """ - return self.status == TestResult._error - - def failed(self): - """ Return true iff the testcase passed. """ - return self.status == TestResult._fail - - def skipped(self): - """ Return true iff the testcase was skipped """ - return self.status == TestResult._skipped - - def pprint_dict(self): - """ - Return a dict that is ideal for passing to pprint. - """ - return {'testcase_name': self.testcase_name, 'status':self.status} - - def pretty_print(self, width=60, outfile=sys.stdout): - """ - Print result to a file in a human readable way. - """ - print('='*width, end='\n', file=outfile) - print("{}: {}".format(self.status, self.testcase_name), end='\n', file=outfile) - print('-'*width, end='\n', file=outfile) - print(self.pretty_message(), end='\n', file=outfile) - print('-'*width, end='\n', file=outfile) - - def pretty_message(self): - """ Return a message to be printed by pretty_print. Returns an empyt string if not overriden. """ - return '' - - - -class FailedTestResult(TestResult): - """ - A basic implementation of TestResult for failed tests. - """ - def __init__(self, testcase, status=TestResult._fail, reason=None): - super(FailedTestResult, self).__init__(testcase, status) - self.reason = reason - - def pprint_dict(self): - """ - Return a dict that is ideal for passing to pprint. - """ - ppdict = super(FailedTestResult, self).pprint_dict() - ppdict['reason'] = self.reason - return ppdict - - def pretty_message(self): - return self.reason - - -class CompoundTestResult(TestResult): - """ - A TestResult returned by running a sequencial test case - """ - def __init__(self, testcase, results): - super(CompoundTestResult, self).__init__(testcase, None) - self.sub_results = results - status_list = [r.status for r in results] - if TestResult._fail in status_list: - self.status = TestResult._fail - elif TestResult._error in status_list: - self.status = TestResult._error - elif TestResult._pass in status_list: - self.status = TestResult._pass - else: - self.status = TestResult._skipped - - def pprint_dict(self): - """ - Returns a dict that is ideal for passing to pprint. - """ - ppdict = super(CompoundTestResult, self).pprint_dict() - ppdict['sub_results'] = list(s.pprint_dict() for s in self.sub_results) - return ppdict - - def pretty_message(self): - return '\n'.join( - "{}: {}{}".format( - st.status, - st.testcase_name, - '\n' + st.pretty_message() if st.status in [TestResult._fail, TestResult._error] else '') - for st in self.sub_results) - - -class SubTestResult(TestResult): - """ - A TestResult for a subtest in a sequencial test case. - """ - def __init__(self, subtest_name, inner_result): - """ - @param subtest_name The name of the subtest. - @param inner_result The result returned from running the subtest. - """ - super(SubTestResult, self).__init__(inner_result.testcase, inner_result.status) - self.inner_result = inner_result - - def pprint_dict(self): - """ - Return a dict that is ideal for passing to pprint. - """ - ppdict = super(CompoundTestResult, self).pprint_dict() - ppdict['inner_result'] = self.inner_result.pprint_dict() - return ppdict - - -class UnhandledExceptionTestResult(TestResult): - """ - A TestResult returned for exceptions that the test case failed to handle. - """ - def __init__(self, testcase, status, exc_type, exc_value, exc_traceback): - super(UnhandledExceptionTestResult, self).__init__(testcase, status) - self.exception_type = exc_type - self.exception_value = exc_value - if not exc_traceback is None: - sio = util.StringIO() - traceback.print_exception(self.exception_type, self.exception_value, exc_traceback, file=sio) - self.exception_message = sio.getvalue() - else: - self.exception_message = "{}: {}".format(str(exc_type), str(exc_value)) - - def pprint_dict(self): - """ - Return a dict that is ideal for passing to pprint. - """ - ppdict = super(UnhandledExceptionTestResult, self).pprint_dict() - ppdict['exception_type'] = self.exception_type - ppdict['exception_value'] = self.exception_value - ppdict['exception_message'] = self.exception_message - return ppdict - - def pretty_message(self): - return self.exception_message - - -class TestCase(object): - """ - Base class for all test cases - """ - def __init__(self, name=None): - """ - @param name A unique test case name. - """ - self.name = name - - def setUp(self): - """ - Called imediately before a testcase is executed. - """ - pass - - def run(self): - """ - Run the test case, and return its result. - """ - raise NotImplementedError - - def tearDown(self): - """ - Called imediately after a testcase is executed. - """ - pass - - def catch(self, exc): - """ - Called when run raises an exception. If the test case - knows how to handle it, it should return it's own result or None. - Otherwise, return the original exception. - """ - return exc - - def setresult(self, test_result): - """ - Called after a test issues a result and before tearDown is called. - """ - self.test_result = test_result - - def make_pass(self, result_type=TestResult, *args, **kwargs): - """ - Make a passed result for this testcase. - """ - return TestResult.make_pass(result_type, self, *args, **kwargs) - - def make_fail(self, result_type=FailedTestResult, *args, **kwargs): - """ - Make a failed result for this testcase. - """ - return TestResult.make_fail(result_type, self, *args, **kwargs) - - -class SequencialTestCase(TestCase): - """ - A test case that executes a sequence of subtests until - one fails. - """ - def __init__(self, name): - super(SequencialTestCase, self).__init__(name) - self.tests = [] - - def add_subtest(self, subtest_name, subtest_func): - """ - Add a subtest. - """ - self.tests.append((subtest_name, subtest_func)) - - def run(self): - return CompoundTestResult(self, list(self._runall())) - - def _runall(self): - return _rungen([SubTestCase(name, func) for name, func in self.tests], failfast=True) - - -class SubTestCase(TestCase): - """ - A subtest of a sequncial test. - """ - def __init__(self, name, func): - super(SubTestCase, self).__init__(name) - self.run = lambda: func(self) - - -def run(tclist, failfast=False): - """ - Run all test cases in tclist and return a list of thier results. - """ - return list(_rungen(tclist, failfast)) - -def _rungen(tclist, failfast=False): - """ - A generator for running tests internally. - """ - for tc in tclist: - result = None - tc.setUp() - try: - result = _result(tc.run(), tc) - except Exception as ex: - result = _result(tc.catch(ex), tc) - tc.tearDown() - yield result - if failfast and (result.failed() or result.errored()): - break - -def _result(res, tc): - """ - Convert res to a TestResult object. - If res is a TestResult object, give it back. - If res is an Exception, return an UnandledExceptionTestResult. - If res is something else, discard it and return a passed TestResult. - """ - if isinstance(res, TestResult): - return res - elif isinstance(res, Exception): - logging.info('uncaught exception: {}'.format(str(res))) - return TestResult.make_error(UnhandledExceptionTestResult, tc, *(sys.exc_info())) - else: - return TestResult.make_pass(TestResult, tc) - -def pprint_results(result_iter, outfile=sys.stdout): - """ - Print pprint version of test results to a file-like object. - @param result_iter An iterator of results to print. - @param outfile An opened file-like object to print to (defaults to stdout). - """ - status_func = lambda r: r.status - result_iter = sorted(result_iter, key=status_func) - status_dict = dict(iter((k, list(map(lambda tc: tc.pprint_dict(), g))) for k, g in itertools.groupby(result_iter, status_func))) - pprint.pprint(status_dict, stream=outfile) - -def pretty_print_results( - result_iter, - count_by_status=True, exclude_passed=True, exclude_skipped=True, exclude_failed=False, - exclude_errored=False, sort_by_status=True, width=60, outfile=sys.stdout): - """ - Print iterator of TestResults in a human readable format to a file-like object. - @param result_iter An iterator of TestResult objects to print. - @param count_by_status Print the number of tests for each status (defaults to True). - @param exclude_passed Exclude passed test results from printing (defaults to True). - @param exclude_skipped Exclude skipped test results from printing (defaults to True). - @param exclude_failed Exclude failed test results from printing (defaults to False). - @param exclude_errored Exclude errored test results from printing (defaults to False). - @param sort_by_status Print test results in order of status: passed, errored, failed, then skipped (defaults to True). - @param width Printing width (defaults to 60). - @param outfile A file-like object to print to (defaults to stdout). - """ - result_list = list(result_iter) - status_func = lambda r: r.status - if sort_by_status: - #TODO: printing order - result_iter = sorted(result_iter, key=status_func) - - if count_by_status: - print('Passed: {}'.format(len([tr for tr in result_list if tr.passed()])), file=outfile) - print('Errors: {}'.format(len([tr for tr in result_list if tr.errored()])), file=outfile) - print('Failed: {}'.format(len([tr for tr in result_list if tr.failed()])), file=outfile) - print('Skipped: {}'.format(len([tr for tr in result_list if tr.skipped()])), file=outfile) - #TODO: something that doesn't expose TestResult._* - print_status = set(itertools.compress([TestResult._pass, TestResult._error, TestResult._fail, TestResult._skipped], - map(lambda n: not n, [exclude_passed, exclude_errored, exclude_failed, exclude_skipped]))) - for tr in (r for r in result_list if r.status in print_status): - tr.pretty_print(width=width, outfile=outfile) - - diff --git a/test-chill/testchill/util.py b/test-chill/testchill/util.py deleted file mode 100644 index 266a94d..0000000 --- a/test-chill/testchill/util.py +++ /dev/null @@ -1,185 +0,0 @@ -import difflib -import functools -import itertools -import logging -import os -import re -import sysconfig -import subprocess -import tempfile - - - -logging.basicConfig(filename='testchill.log', level=logging.DEBUG, filemode='w') -#logging.basicConfig(level=logging.INFO) - -python_version = sysconfig.get_python_version() -python_version_major = int(sysconfig.get_python_version().split('.')[0]) -python_version_minor = int(sysconfig.get_python_version().split('.')[1]) - -if python_version_major == 2: - from StringIO import StringIO -else: - from io import StringIO - -_temp_dirs = [] -_temp_files = [] - -### Errors ### -### Shell Util ### - -def shell(cmd, args=[], stdout=None, stderr=None, env={}, wd=os.getcwd()): - """ - Execute a shell command. - @params cmd The command name - @params args A list of command line arguments (defaults to []) - @params stdout A file like object or file number that reads input written to stdout. - stdout will be returned as a string if this is None or not given. - @params stderr A file like object or file number that reads input written to stderr. - @params env A dict of environment variables. Before the command is executed, these will be exported - @params wd The working directory. Before the command is executed, the working directory will be changed to wd. (wd defaults to the current working directory) - """ - fullcmd = ' '.join(['export {}={};'.format(k,str(v)) for k,v in env.items()] + ['cd {};'.format(wd)] + [cmd] + args) - logging.info('shell: '+fullcmd) - if stdout == None: - outp = subprocess.check_output(fullcmd, stderr=stderr, shell=True) - if python_version_major == 2: - return outp - elif python_version_major == 3: - return outp.decode() - else: - subprocess.check_call(fullcmd, stdout=stdout, stderr=stderr, shell=True) - -def mkdir_p(directory, temp=False, **kwargs): - """ - Make directory (equivelent to shell('mkdir', ['-p', directory])) - """ - if not os.path.exists(directory): - if temp and (directory not in _temp_dirs): - _temp_dirs.append(directory) - shell('mkdir', ['-p', directory], **kwargs) - -def set_tempfile(filename): - """ - Add a file to a list of temp files - @param filename The full path to a temparary file. - """ - _temp_files.append(filename) - -def withtmp(wtfunc, rdfunc): - """ - Perform some operation using a temporary file. - @param wtfunc A function that writes to the temparary file - @param rdfybc A function that reads from the temparary file - """ - with tempfile.TemporaryFile() as f: - wtfunc(f) - f.seek(0) - return rdfunc(f) - -def rmtemp(): - """ - Clean temp files and directories - """ - for temp_file in list(_temp_files): - if os.path.exists(temp_file): - shell('rm', [temp_file]) - _temp_files.remove(temp_file) - - for temp_dir in list(_temp_dirs): - if os.path.exists(temp_dir): - shell('rm', ['-rf', temp_dir]) - _temp_dirs.remove(temp_dir) - -def mktemp(mode=None): - """ - Create a temparary file. Returns a two-tuple with an open file object and the filename. - """ - fd, name = tempfile.mkstemp() - _temp_files.append(name) - if mode is None: - os.close(fd) - return name - else: - return os.fdopen(fd, mode), name - - -### Misc Util ### - -def copy(obj, exclude=[]): - """ - Make a shallow copy of a python object with __dict__, excluding any attribute in exclude - @param obj The object to copy - @param exclude A list of attributes to ignore - """ - nobj = type(obj)() - for k, v in vars(obj).items(): - if k in exclude: continue - setattr(nobj, k, v) - return nobj - -def applyenv(line): - """ - Apply bash style environment variables to a string - @param line The input string - """ - return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)\b',lambda m: str(os.getenv(m.group(1), '')), line) - -def callonce(func): - """ - Assert that a function is only ever called once. - @param func Function to only be run once. - """ - pred_name = '__' + func.__module__.replace('.','__') + '_' + func.__name__ + '_called' - globals()[pred_name] = False - @functools.wraps(func) - def wrapper(*args, **kwargs): - if not globals()[pred_name]: - globals()[pred_name] = True - return func(*args, **kwargs) - else: - raise Exception('{} was invoked multiple times.'.format(func.__name___)) - return wrapper - -def isdiff(strone, strtwo): - """ - Diff two strings. Returns a two element tuple. The first is True if the the two files are different, and the - next is a textual representation of the diff. - @param strone First string. - @param strtwo Second string. - """ - diff = list(difflib.ndiff(strone.splitlines(), strtwo.splitlines())) - return len(list(line for line in diff if line[0] in ['-','+'])) != 0, '\n'.join(diff) - -def filterext(ext_list, filenames): - """ - Filter file names by extension. - @param ext_list A list of extensions. - @param filenames An iterable object of file names. - """ - return iter(s for s in filenames if any(s.strip().endswith(e) for e in ext_list)) - -def extract_tag(tagname, filename, wd=os.getcwd()): - """ - Extract commented out text in each html tag '<tagname>'. Returns a list of tuples for each tag. - Each tuple has two elements, the first is the text found in the tag, the second contains a dict - of attributes given in the tag. - @param tagname The name of the tag to search for. - @param filename A filename to search for comments in. - @param wd The working directory. - """ - from . import _extract - return _extract.extract_tag(tagname, filename, wd) - -def textstream(txt): - """ - Creates a stream from text. Intended to hide version differences between 2 and 3. - @param txt A string to use as the default data in a stream. - """ - if python_version_major == 2: - import StringIO - return StringIO.StringIO(txt) - elif python_version_major == 3: - import io - return io.StringIO(txt) - diff --git a/test-chill/testrun.log b/test-chill/testrun.log new file mode 100644 index 0000000..7611517 --- /dev/null +++ b/test-chill/testrun.log @@ -0,0 +1,16 @@ +Test Run By bobw on Mon Sep 21 12:59:26 2015 +Native configuration is x86_64-unknown-linux-gnu + + === tests === + +Schedule of variations: + unix + +Running target unix +Using /usr/local/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /usr/local/share/dejagnu/config/unix.exp as generic interface file for target. +WARNING: Couldn't find tool config file for unix, using default. + + === Summary === + +runtest completed at Mon Sep 21 12:59:26 2015 diff --git a/test-chill/unit-tests/__init__.py b/test-chill/unit-tests/__init__.py deleted file mode 100644 index 8b13789..0000000 --- a/test-chill/unit-tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_in.py b/test-chill/unit-tests/cpp_validate_prog/mm_in.py deleted file mode 100755 index 93eb080..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_in.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/python - -import struct - -data = list(range(15)) + list(range(10)) + [0]*6 -bindata = ''.join([struct.pack('f',n) for n in data]) -with open('mm.in.data','wb') as f: - f.write(bindata) - diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one.cc deleted file mode 100644 index 6131ae1..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one.cc +++ /dev/null @@ -1,29 +0,0 @@ -#define AN 3 -#define BM 2 -#define AMBN 5 - -/* - -<test name='mm_small'> - -procedure void mm( - in float[3][5] A = matrix([*,*],lambda i,j: random(-8,8)), - in float[5][2] B = matrix([*,*],lambda i,j: random(-8,8)), - out float[3][2] C = matrix([*,*],lambda i,j: 0)) - -</test> - -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one.testproc b/test-chill/unit-tests/cpp_validate_prog/mm_one.testproc deleted file mode 100644 index a12a963..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one.testproc +++ /dev/null @@ -1,6 +0,0 @@ - -procedure void mm( - in float[3][5] A = matrix([*,*],lambda i,j: random(-8,8)), - in float[5][2] B = matrix([*,*],lambda i,j: random(-8,8)), - out float[3][2] C = matrix([*,*],lambda i,j: 0)) - diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_defines.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one_defines.cc deleted file mode 100644 index e35f189..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_defines.cc +++ /dev/null @@ -1,25 +0,0 @@ - -/* -<test name='mm_small' define="{'AN':3, 'BM':2, 'AMBN':5}"> - -procedure void mm( - in float[AN][AMBN] A = matrix([*,*],lambda i,j: random(-8,8)), - in float[AMBN][BM] B = matrix([*,*],lambda i,j: random(-8,8)), - out float[AN][BM] C = matrix([*,*],lambda i,j: 0)) - -</test> - -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_longer_main.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one_longer_main.cc deleted file mode 100644 index 5b7e6c1..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_longer_main.cc +++ /dev/null @@ -1,93 +0,0 @@ -#define AN 3 -#define BM 2 -#define AMBN 5 -//#define PRINT - -#include <time.h> -#include <fstream> -#include <cstdio> - -/* - -<test name='mm_small'> - -procedure void mm( - in float[3][5] A = matrix([*,*],lambda i,j: random(-8,8)), - in float[5][2] B = matrix([*,*],lambda i,j: random(-8,8)), - out float[3][2] C = matrix([*,*],lambda i,j: 0)) - -</test> - -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - C[i][j] = 0; - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} - -int main(int argc, char** argv) { - float A[3][5] = {{0,1,2,3,4},{5,6,7,8,9},{10,11,12,13,14}}; - float B[5][2] = {{0,1},{2,3},{4,5},{6,7},{8,9}}; - float C[3][2] = {{0,0},{0,0},{0,0}}; - timespec start_time; - timespec end_time; - - if (argc == 3) { - std::ifstream is(argv[1], std::ifstream::in | std::ifstream::binary); - is.read((char*)A, 15*sizeof(float)); - is.read((char*)B, 10*sizeof(float)); - is.close(); - } - - clock_gettime(CLOCK_REALTIME, &start_time); - for(int i = 0; i < 10000; i++) { - mm(A,B,C); - } - clock_gettime(CLOCK_REALTIME, &end_time); - - if (argc == 3) { - std::ofstream os(argv[2], std::ofstream::out | std::ofstream::binary); - os.write((char*)C, 6*sizeof(float)); - os.close(); - } - - #ifdef PRINT - std::printf("A:\n"); - for(int i = 0; i < 3; i++) { - std::printf("["); - for(int j = 0; j < 5; j++) { - std::printf("%f,",A[i][j]); - } - std::printf("]\n"); - } - std::printf("B:\n"); - for(int i = 0; i < 5; i++) { - std::printf("["); - for(int j = 0; j < 2; j++) { - std::printf("%f,",B[i][j]); - } - std::printf("]\n"); - } - std::printf("C:\n"); - for(int i = 0; i < 3; i++) { - std::printf("["); - for(int j = 0; j < 2; j++) { - std::printf("%f,",C[i][j]); - } - std::printf("]\n"); - } - #else - double time_diff = (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec)/1000000000.0; - std::printf("(%f,)", time_diff); - #endif - return 0; -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_longer_wrong_main.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one_longer_wrong_main.cc deleted file mode 100644 index 7d96248..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_longer_wrong_main.cc +++ /dev/null @@ -1,93 +0,0 @@ -#define AN 3 -#define BM 2 -#define AMBN 5 -//#define PRINT - -#include <time.h> -#include <fstream> -#include <cstdio> - -/* - -<test name='mm_small'> - -procedure void mm( - in float[3][5] A = matrix([*,*],lambda i,j: random(-8,8)), - in float[5][2] B = matrix([*,*],lambda i,j: random(-8,8)), - out float[3][2] C = matrix([*,*],lambda i,j: 0)) - -</test> - -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - C[i][j] = 0; - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] + B[k][j]; - } - } - } -} - -int main(int argc, char** argv) { - float A[3][5] = {{0,1,2,3,4},{5,6,7,8,9},{10,11,12,13,14}}; - float B[5][2] = {{0,1},{2,3},{4,5},{6,7},{8,9}}; - float C[3][2] = {{0,0},{0,0},{0,0}}; - timespec start_time; - timespec end_time; - - if (argc == 3) { - std::ifstream is(argv[1], std::ifstream::in | std::ifstream::binary); - is.read((char*)A, 15*sizeof(float)); - is.read((char*)B, 10*sizeof(float)); - is.close(); - } - - clock_gettime(CLOCK_REALTIME, &start_time); - for(int i = 0; i < 1000000; i++) { - mm(A,B,C); - } - clock_gettime(CLOCK_REALTIME, &end_time); - - if (argc == 3) { - std::ofstream os(argv[2], std::ofstream::out | std::ofstream::binary); - os.write((char*)C, 6*sizeof(float)); - os.close(); - } - - #ifdef PRINT - std::printf("A:\n"); - for(int i = 0; i < 3; i++) { - std::printf("["); - for(int j = 0; j < 5; j++) { - std::printf("%f,",A[i][j]); - } - std::printf("]\n"); - } - std::printf("B:\n"); - for(int i = 0; i < 5; i++) { - std::printf("["); - for(int j = 0; j < 2; j++) { - std::printf("%f,",B[i][j]); - } - std::printf("]\n"); - } - std::printf("C:\n"); - for(int i = 0; i < 3; i++) { - std::printf("["); - for(int j = 0; j < 2; j++) { - std::printf("%f,",C[i][j]); - } - std::printf("]\n"); - } - #else - double time_diff = (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec)/1000000000.0; - std::printf("(%f,)", time_diff); - #endif - return 0; -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_main.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one_main.cc deleted file mode 100644 index a03b505..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_main.cc +++ /dev/null @@ -1,91 +0,0 @@ -#define AN 3 -#define BM 2 -#define AMBN 5 -//#define PRINT - -#include <time.h> -#include <fstream> -#include <cstdio> - -/* - -<test name='mm_small'> - -procedure void mm( - in float[3][5] A = matrix([*,*],lambda i,j: random(-8,8)), - in float[5][2] B = matrix([*,*],lambda i,j: random(-8,8)), - out float[3][2] C = matrix([*,*],lambda i,j: 0)) - -</test> - -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - C[i][j] = 0; - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} - -int main(int argc, char** argv) { - float A[3][5] = {{0,1,2,3,4},{5,6,7,8,9},{10,11,12,13,14}}; - float B[5][2] = {{0,1},{2,3},{4,5},{6,7},{8,9}}; - float C[3][2] = {{0,0},{0,0},{0,0}}; - timespec start_time; - timespec end_time; - - if (argc == 3) { - std::ifstream is(argv[1], std::ifstream::in | std::ifstream::binary); - is.read((char*)A, 15*sizeof(float)); - is.read((char*)B, 10*sizeof(float)); - is.close(); - } - - clock_gettime(CLOCK_REALTIME, &start_time); - mm(A,B,C); - clock_gettime(CLOCK_REALTIME, &end_time); - - if (argc == 3) { - std::ofstream os(argv[2], std::ofstream::out | std::ofstream::binary); - os.write((char*)C, 6*sizeof(float)); - os.close(); - } - - #ifdef PRINT - std::printf("A:\n"); - for(int i = 0; i < 3; i++) { - std::printf("["); - for(int j = 0; j < 5; j++) { - std::printf("%f,",A[i][j]); - } - std::printf("]\n"); - } - std::printf("B:\n"); - for(int i = 0; i < 5; i++) { - std::printf("["); - for(int j = 0; j < 2; j++) { - std::printf("%f,",B[i][j]); - } - std::printf("]\n"); - } - std::printf("C:\n"); - for(int i = 0; i < 3; i++) { - std::printf("["); - for(int j = 0; j < 2; j++) { - std::printf("%f,",C[i][j]); - } - std::printf("]\n"); - } - #else - double time_diff = (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec)/1000000000.0; - std::printf("(%f,)", time_diff); - #endif - return 0; -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_out.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one_out.cc deleted file mode 100644 index 6151301..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_out.cc +++ /dev/null @@ -1,60 +0,0 @@ -#include <time.h> -#include <fstream> -#include <cstdio> - - -#define AN 3 -#define BM 2 -#define AMBN 5 - -/* - -<test name='mm_small'> - -procedure void mm( - in float[3][5] A = matrix([*,*],lambda i,j: random(-8,8)), - in float[5][2] B = matrix([*,*],lambda i,j: random(-8,8)), - out float[3][2] C = matrix([*,*],lambda i,j: 0)) - -</test> - -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} - -int main(int argc, char** argv) { - float A[3][5]; - float B[5][2]; - float C[3][2]; - timespec start_time; - timespec end_time; - - std::ifstream datafile_initialize(argv[1]); - datafile_initialize.read((char*)A, 15*sizeof(float)); - datafile_initialize.read((char*)B, 10*sizeof(float)); - datafile_initialize.read((char*)C, 6*sizeof(float)); - datafile_initialize.close(); - - clock_gettime(CLOCK_REALTIME, &start_time); - mm(A,B,C); - clock_gettime(CLOCK_REALTIME, &end_time); - - std::ofstream datafile_out(argv[2]); - datafile_out.write((char*)C, 6*sizeof(float)); - datafile_out.close(); - - double time_diff = (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec)/1000000000.0; - std::printf("(%f,)", time_diff); - return 0; -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_with.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one_with.cc deleted file mode 100644 index 9cb0ae4..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_with.cc +++ /dev/null @@ -1,30 +0,0 @@ -#define AN 3 -#define BM 2 -#define AMBN 5 - -/* - -<test name='mm_small'> - -with {evendist2:lambda i,j: random(-8,8), zero2:lambda i,j: 0} -procedure void mm( - in float[3][5] A = matrix([*,*],evendist2), - in float[5][2] B = matrix([*,*],evendist2), - out float[3][2] C = matrix([*,*],zero2)) - -</test> - -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_with.testproc b/test-chill/unit-tests/cpp_validate_prog/mm_one_with.testproc deleted file mode 100644 index 80bc841..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_with.testproc +++ /dev/null @@ -1,7 +0,0 @@ - -with {evendist2:lambda i,j: random(-8,8), zero2:lambda i,j: 0} -procedure void mm( - in float[3][5] A = matrix([*,*],evendist2), - in float[5][2] B = matrix([*,*],evendist2), - out float[3][2] C = matrix([*,*],zero2)) - diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_one_with_defines.cc b/test-chill/unit-tests/cpp_validate_prog/mm_one_with_defines.cc deleted file mode 100644 index 77ce673..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_one_with_defines.cc +++ /dev/null @@ -1,25 +0,0 @@ - -/* -<test name='mm_small' define="{'AN':3, 'BM':2, 'AMBN':5}"> - -with {evendist2:lambda i,j: random(-8,8), zero2:lambda i,j: 0} -procedure void mm( - in float[AN][AMBN] A = matrix([*,*],evendist2), - in float[AMBN][BM] B = matrix([*,*],evendist2), - out float[AN][BM] C = matrix([*,*],zero2)) - -</test> -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - int i; - int j; - int k; - for(i = 0; i < AN; i++) { - for(j = 0; j < BM; j++) { - for(k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_three_basic.cc b/test-chill/unit-tests/cpp_validate_prog/mm_three_basic.cc deleted file mode 100644 index 49df049..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_three_basic.cc +++ /dev/null @@ -1,33 +0,0 @@ -/* -<test name=small define="{'AN':2, 'AMBN':5, 'BM':3}"> - procedure void mm( - in float[AN][AMBN] A = matrix([,],lambda i,j: i*AMBN + j), - in float[AMBN][BM] B = matrix([,],lambda i,j: i*BM + j), - out float[AN][BM] C = matrix([,],lambda i,j: 0)) -</test> - -<test name=medium define="{'AN':20, 'AMBN':50, 'BM':30}"> - procedure void mm( - in float[AN][AMBN] A = matrix([,],lambda i,j: i*AMBN + j), - in float[AMBN][BM] B = matrix([,],lambda i,j: i*BM + j), - out float[AN][BM] C = matrix([,],lambda i,j: 0)) -</test> - -<test name=big define="{'AN':200, 'AMBN':500, 'BM':300}"> - procedure void mm( - in float[AN][AMBN] A = matrix([,],lambda i,j: i*AMBN + j), - in float[AMBN][BM] B = matrix([,],lambda i,j: i*BM + j), - out float[AN][BM] C = matrix([,],lambda i,j: 0)) -</test> -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - for(int i = 0; i < AN; i++) { - for(int j = 0; j < BM; j++) { - C[i][j] = 0; - for(int k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } -} diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_three_basic.cc.data b/test-chill/unit-tests/cpp_validate_prog/mm_three_basic.cc.data Binary files differdeleted file mode 100644 index 82c5ce6..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_three_basic.cc.data +++ /dev/null diff --git a/test-chill/unit-tests/cpp_validate_prog/mm_three_slow.cc b/test-chill/unit-tests/cpp_validate_prog/mm_three_slow.cc deleted file mode 100644 index dd8c7e7..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/mm_three_slow.cc +++ /dev/null @@ -1,35 +0,0 @@ -/* -<test name=small define="{'AN':2, 'AMBN':5, 'BM':3}"> - procedure void mm( - in float[AN][AMBN] A = matrix([,],lambda i,j: i*AMBN + j), - in float[AMBN][BM] B = matrix([,],lambda i,j: i*BM + j), - out float[AN][BM] C = matrix([,],lambda i,j: 0)) -</test> - -<test name=medium define="{'AN':20, 'AMBN':50, 'BM':30}"> - procedure void mm( - in float[AN][AMBN] A = matrix([,],lambda i,j: i*AMBN + j), - in float[AMBN][BM] B = matrix([,],lambda i,j: i*BM + j), - out float[AN][BM] C = matrix([,],lambda i,j: 0)) -</test> - -<test name=big define="{'AN':200, 'AMBN':500, 'BM':300}"> - procedure void mm( - in float[AN][AMBN] A = matrix([,],lambda i,j: i*AMBN + j), - in float[AMBN][BM] B = matrix([,],lambda i,j: i*BM + j), - out float[AN][BM] C = matrix([,],lambda i,j: 0)) -</test> -*/ - -void mm(float A[AN][AMBN], float B[AMBN][BM], float C[AN][BM]) { - for(int w = 0; w < 100; w++) { - for(int i = 0; i < AN; i++) { - for(int j = 0; j < BM; j++) { - C[i][j] = 0; - for(int k = 0; k < AMBN; k++) { - C[i][j] += A[i][k] * B[k][j]; - } - } - } - } -} diff --git a/test-chill/unit-tests/cpp_validate_prog/print_mm_out.py b/test-chill/unit-tests/cpp_validate_prog/print_mm_out.py deleted file mode 100755 index fefbd2a..0000000 --- a/test-chill/unit-tests/cpp_validate_prog/print_mm_out.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/python - -import struct -import numpy as np - -with open('mm.out.data','rb') as f: - data = f.read() - -mat = np.array([struct.unpack_from('f',data,n*4) for n in range(len(data)/4)]).reshape((3,2)) -print(mat) diff --git a/test-chill/unit-tests/cprog/Makefile b/test-chill/unit-tests/cprog/Makefile deleted file mode 100644 index f5f2608..0000000 --- a/test-chill/unit-tests/cprog/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -OBJS = $(patsubst %.cc, %.o, $(wildcard *.cc)) - -.PHONY: all -all: sorter - -$(OBJS): %.o: %.cc - g++ -g -fprofile-arcs -ftest-coverage -c $< -o $@ - -.PHONY: sorter -sorter: $(OBJS) - g++ -g -fprofile-arcs -ftest-coverage -o bin/sorter $(OBJS) - -.PHONY: clean -clean: - rm -f *.o - rm -f *.gcno *.gcda *.gcov - rm -f bin/sorter diff --git a/test-chill/unit-tests/cprog/MergeSorter.cc b/test-chill/unit-tests/cprog/MergeSorter.cc deleted file mode 100644 index 6e747a3..0000000 --- a/test-chill/unit-tests/cprog/MergeSorter.cc +++ /dev/null @@ -1,77 +0,0 @@ -#include "MergeSorter.h" - -/* Python -def msort(lst, start, end, pindent = 0): - if start == end: - return - center = start + ((end - start) // 2) - print(' '*pindent + "SPLIT {}|{}".format(lst[start:center+1], lst[center+1:end+1])) - msort(lst, start, center, pindent+1) - msort(lst, center+1, end, pindent+1) - left = list(lst[start:center+1]) - right = list(lst[center+1:end+1]) - print(' '*pindent + "MERGE {}|{}".format(lst[start:center+1], lst[center+1:end+1])) - i,j = 0, 0 - for k in range(start, end+1): - if i >= len(left): - lst[k] = right[j] - j += 1 - print(' '*(pindent+1) + 'pull j: {} {} {}'.format(lst[start:k+1], left[i:], right[j:])) - elif j >= len(right): - lst[k] = left[i] - i += 1 - print(' '*(pindent+1) + 'pull i: {} {} {}'.format(lst[start:k+1], left[i:], right[j:])) - elif left[i] > right[j]: - lst[k] = right[j] - j += 1 - print(' '*(pindent+1) + 'pull j: {} {} {}'.format(lst[start:k+1], left[i:], right[j:])) - else: - lst[k] = left[i] - i += 1 - print(' '*(pindent+1) + 'pull i: {} {} {}'.format(lst[start:k+1], left[i:], right[j:])) - print(' '*pindent + "-- {}".format(lst[start:end+1])) - - -if __name__ == '__main__': - import random as r - x = [int(r.random()*12) for i in range(7)] - print(x) - msort(x, 0, len(x)-1) - print(x) -*/ - -static void mergesort(std::vector<int>& lst, int start, int end) { - if(start == end) return; - int center = start + (end-start)/2; - mergesort(lst, start, center); - mergesort(lst, center+1, end); - std::vector<int> left = std::vector<int>(lst.begin()+start, lst.begin()+(center+1)); - std::vector<int> right = std::vector<int>(lst.begin()+(center+1),lst.begin()+(end+1)); - int i = 0; - int j = 0; - for(int k = start; k < (end+1); k++) { - if (i >= left.size()) { - lst[k] = right[j++]; - } - else if(j >= right.size()) { - lst[k] = left[i++]; - } - else if(left[i] > right[j]) { - lst[k] = right[j++]; - } - else { - lst[k] = left[i++]; - } - } -} - -MergeSorter::MergeSorter() { - this->name = std::string("mergesort"); -} - -MergeSorter::~MergeSorter() { -} - -void MergeSorter::sort(std::vector<int>& list) const { - mergesort(list, 0, list.size()-1); -} diff --git a/test-chill/unit-tests/cprog/MergeSorter.h b/test-chill/unit-tests/cprog/MergeSorter.h deleted file mode 100644 index e2ed391..0000000 --- a/test-chill/unit-tests/cprog/MergeSorter.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef MERGE_SORTER_H -#define MERGE_SORTER_H - -#include <vector> -#include "Sorter.h" - -class MergeSorter : public Sorter { -public: - MergeSorter(); - virtual ~MergeSorter(); - virtual void sort(std::vector<int>& list) const; -}; - -#endif diff --git a/test-chill/unit-tests/cprog/QuickSorter.cc b/test-chill/unit-tests/cprog/QuickSorter.cc deleted file mode 100644 index 3ade346..0000000 --- a/test-chill/unit-tests/cprog/QuickSorter.cc +++ /dev/null @@ -1,83 +0,0 @@ -#include "QuickSorter.h" - -/* Python - -def swap(l, i, k): - v = l[i] - l[i] = l[k] - l[k] = v - print(str(l)) - -def partition(l, start, end): - print("PARTITION {} [{}:{}]".format(l, start, end)) - p_value = l[end] - p_index = end-1 - - for i in range(start, end): - while(i < p_index and l[i] >= p_value): - swap(l, i, p_index) - p_index -= 1 - while(i >= p_index and l[i] < p_value): - swap(l, i, p_index) - p_index += 1 - swap(l, p_index, end) - print("DONE {}|[{}]|{}:{}".format(l[start:p_index], l[p_index], l[p_index+1:end+1], p_value)) - return p_index - -def qsort(l, i, k): - if i < k: - p = partition(l, i, k) - qsort(l,i,p-1) - qsort(l,p+1,k) - -if __name__ == "__main__": - import random as r - x = [int(r.random()*12) for i in range(12)] - print(x) - qsort(x, 0, len(x)-1) - print(x) - -*/ - -static void swap(std::vector<int>& list, int i, int k) { - int v = list[i]; - list[i] = list[k]; - list[k] = v; -} - -static int partition(std::vector<int>& list, int i, int k) { - int pivot_value = list[k]; - int pivot_index = k - 1; - - for(int index = i; index < k; index++) { - while((index < pivot_index) && (list[index] >= pivot_value)) { - swap(list, index, pivot_index); - pivot_index--; - } - while((index >= pivot_index) && (list[index] < pivot_value)) { - swap(list, index, pivot_index); - pivot_index++; - } - } - swap(list, pivot_index, k); - return pivot_index; -} - -static void quicksort(std::vector<int>& list, int i, int k) { - if(i < k) { - int p = partition(list, i, k); - quicksort(list, i, p-1); - quicksort(list, p+1, k); - } -} - -QuickSorter::QuickSorter() { - this->name = std::string("quicksort"); -} - -QuickSorter::~QuickSorter() { -} - -void QuickSorter::sort(std::vector<int>& list) const { - quicksort(list, 0, list.size()-1); -} diff --git a/test-chill/unit-tests/cprog/QuickSorter.h b/test-chill/unit-tests/cprog/QuickSorter.h deleted file mode 100644 index 81919dd..0000000 --- a/test-chill/unit-tests/cprog/QuickSorter.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef QUICK_SORTER_H -#define QUICK_SORTER_H - -#include <vector> -#include "Sorter.h" - -class QuickSorter : public Sorter { -public: - QuickSorter(); - virtual ~QuickSorter(); - virtual void sort(std::vector<int>& list) const; -}; - -#endif diff --git a/test-chill/unit-tests/cprog/Sorter.cc b/test-chill/unit-tests/cprog/Sorter.cc deleted file mode 100644 index a1ae5ec..0000000 --- a/test-chill/unit-tests/cprog/Sorter.cc +++ /dev/null @@ -1,8 +0,0 @@ -#include "Sorter.h" - -Sorter::Sorter() { -} - -Sorter::~Sorter() { -} - diff --git a/test-chill/unit-tests/cprog/Sorter.h b/test-chill/unit-tests/cprog/Sorter.h deleted file mode 100644 index abf8f82..0000000 --- a/test-chill/unit-tests/cprog/Sorter.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef SORTER_H -#define SORTER_H - -#include <string> -#include <vector> - -class Sorter { -public: - Sorter(); - virtual ~Sorter(); - - std::string name; - virtual void sort(std::vector<int>& list) const = 0; -}; - -#endif diff --git a/test-chill/unit-tests/cprog/main.cc b/test-chill/unit-tests/cprog/main.cc deleted file mode 100644 index 3fe960b..0000000 --- a/test-chill/unit-tests/cprog/main.cc +++ /dev/null @@ -1,45 +0,0 @@ -#include <cstdio> -#include <cstdlib> -#include <map> -#include <string> -#include <vector> - -#include "Sorter.h" -#include "QuickSorter.h" -#include "MergeSorter.h" -//#include "InsertionSorter.h" -//#include "ShellSorter.h" - -void read_vector(std::vector<int>& vec, int start, int stop, char** argv) { - for(int i = start; i < stop; i++) { - vec.push_back((int)strtol(argv[i],NULL,0)); - } -} - -void print_vector(std::vector<int>& vec) { - printf("["); - for(std::vector<int>::iterator iter = vec.begin(); iter != vec.end(); iter++) { - printf(" %d ", *iter); - } - printf("]\n"); -} - -void addsorter(std::map<std::string, Sorter*>& m, Sorter* s) { - m[s->name] = s; -} - -int main(int argc, char** argv) { - std::map<std::string, Sorter*> sorter_map; - std::vector<int> vec; - - read_vector(vec, 2, argc, argv); - print_vector(vec); - - addsorter(sorter_map, new QuickSorter()); - addsorter(sorter_map, new MergeSorter()); - //addsorter(sorter_map, new InsertionSorter()); - //addsorter(sorter_map, new ShellSorter()); - sorter_map[std::string(argv[1])]->sort(vec); - print_vector(vec); -} - diff --git a/test-chill/unit-tests/test___main__.py b/test-chill/unit-tests/test___main__.py deleted file mode 100644 index 7a79417..0000000 --- a/test-chill/unit-tests/test___main__.py +++ /dev/null @@ -1,205 +0,0 @@ -import os -import unittest - -import testchill.gcov as gcov -import testchill.__main__ as main - - -def runtest(tc): - tc.setUp() - tc.run() - tc.tearDown() - -class TestMain(unittest.TestCase): - def setUp(self): - self.chill_dev_src = os.getenv('CHILL_DEV_SRC') - self.chill_release_src = os.getenv('CHILL_RELEASE_SRC') - self.omega_dev_src = os.getenv('OMEGA_DEV_SRC') - self.omega_release_src = os.getenv('OMEGA_RELEASE_SRC') - self.staging_dir_bin = os.getenv('STAGING_DIR_BIN') - self.staging_dir_wd = os.getenv('STAGING_DIR_WD') - - def test_main_parse_chillbuild(self): - pass - - def test_main_parse_chill_dev(self): - tclist = main.args_to_tclist('-b {} chill-testcase path/to/somescript.script path/to/somesrc.c'.format(self.staging_dir_bin).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - - self.assertEqual(tc.config.chill_dir, None) - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.build_cuda, False) - self.assertEqual(tc.config.version, 'dev') - self.assertEqual(tc.config.script_lang, 'script') - - self.assertEqual(tc.name, 'chill:somescript.script') - self.assertEqual(tc.wd, os.getcwd()) - self.assertEqual(tc.chill_bin, os.path.join(self.staging_dir_bin, 'chill')) - self.assertEqual(tc.chill_script, 'somescript.script') - self.assertEqual(tc.chill_src, 'somesrc.c') - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'path/to/somescript.script')) - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'path/to/somesrc.c')) - self.assertEqual(tc.chill_gensrc, 'rose_somesrc.c') - - def test_main_parse_chill_lua_dev(self): - tclist = main.args_to_tclist('-b {} chill-testcase path/to/somescript.lua path/to/somesrc.c'.format(self.staging_dir_bin).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - - self.assertEqual(tc.config.chill_dir, None) - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.build_cuda, False) - self.assertEqual(tc.config.version, 'dev') - self.assertEqual(tc.config.script_lang, 'lua') - - self.assertEqual(tc.name, 'chill-lua:somescript.lua') - self.assertEqual(tc.wd, os.getcwd()) - self.assertEqual(tc.chill_bin, os.path.join(self.staging_dir_bin, 'chill-lua')) - self.assertEqual(tc.chill_script, 'somescript.lua') - self.assertEqual(tc.chill_src, 'somesrc.c') - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'path/to/somescript.lua')) - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'path/to/somesrc.c')) - self.assertEqual(tc.chill_gensrc, 'rose_somesrc.c') - - def test_main_parse_chill_python_dev(self): - tclist = main.args_to_tclist('-b {} chill-testcase path/to/somescript.py path/to/somesrc.c'.format(self.staging_dir_bin).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - - self.assertEqual(tc.config.chill_dir, None) - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.build_cuda, False) - self.assertEqual(tc.config.version, 'dev') - self.assertEqual(tc.config.script_lang, 'python') - - self.assertEqual(tc.name, 'chill-python:somescript.py') - self.assertEqual(tc.wd, os.getcwd()) - self.assertEqual(tc.chill_bin, os.path.join(self.staging_dir_bin, 'chill-python')) - self.assertEqual(tc.chill_script, 'somescript.py') - self.assertEqual(tc.chill_src, 'somesrc.c') - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'path/to/somescript.py')) - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'path/to/somesrc.c')) - self.assertEqual(tc.chill_gensrc, 'rose_somesrc.c') - - def test_main_parse_cudachill_dev(self): - tclist = main.args_to_tclist('-b {} chill-testcase -u path/to/somescript.lua path/to/somesrc.c'.format(self.staging_dir_bin).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - - self.assertEqual(tc.config.chill_dir, None) - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.build_cuda, True) - self.assertEqual(tc.config.version, 'dev') - self.assertEqual(tc.config.script_lang, 'lua') - - self.assertEqual(tc.name, 'cuda-chill:somescript.lua') - self.assertEqual(tc.wd, os.getcwd()) - self.assertEqual(tc.chill_bin, os.path.join(self.staging_dir_bin, 'cuda-chill')) - self.assertEqual(tc.chill_script, 'somescript.lua') - self.assertEqual(tc.chill_src, 'somesrc.c') - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'path/to/somescript.lua')) - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'path/to/somesrc.c')) - self.assertEqual(tc.chill_gensrc, 'rose_somesrc.cu') - - def test_main_parse_cudachill_python_dev(self): - tclist = main.args_to_tclist('-b {} chill-testcase -u path/to/somescript.py path/to/somesrc.c'.format(self.staging_dir_bin).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - - self.assertEqual(tc.config.chill_dir, None) - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.build_cuda, True) - self.assertEqual(tc.config.version, 'dev') - self.assertEqual(tc.config.script_lang, 'python') - - self.assertEqual(tc.name, 'cuda-chill-python:somescript.py') - self.assertEqual(tc.wd, os.getcwd()) - self.assertEqual(tc.chill_bin, os.path.join(self.staging_dir_bin, 'cuda-chill-python')) - self.assertEqual(tc.chill_script, 'somescript.py') - self.assertEqual(tc.chill_src, 'somesrc.c') - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'path/to/somescript.py')) - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'path/to/somesrc.c')) - self.assertEqual(tc.chill_gensrc, 'rose_somesrc.cu') - - def test_main_parse_chill_release(self): - tclist = main.args_to_tclist('-b {} chill-testcase -v release path/to/somescript.script path/to/somesrc.c'.format(self.staging_dir_bin).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'chill-release:somescript.script') - self.assertEqual(tc.wd, os.getcwd()) - self.assertEqual(tc.chill_bin, os.path.join(self.staging_dir_bin, 'chill-release')) - self.assertEqual(tc.chill_script, 'somescript.script') - self.assertEqual(tc.chill_src, 'somesrc.c') - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'path/to/somescript.script')) - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'path/to/somesrc.c')) - self.assertEqual(tc.chill_gensrc, 'rose_somesrc.c') - - def test_main_parse_chill_release(self): - tclist = main.args_to_tclist('-b {} chill-testcase -uv release path/to/somescript.lua path/to/somesrc.c'.format(self.staging_dir_bin).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'cuda-chill-release:somescript.lua') - self.assertEqual(tc.wd, os.getcwd()) - self.assertEqual(tc.chill_bin, os.path.join(self.staging_dir_bin, 'cuda-chill-release')) - self.assertEqual(tc.chill_script, 'somescript.lua') - self.assertEqual(tc.chill_src, 'somesrc.c') - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'path/to/somescript.lua')) - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'path/to/somesrc.c')) - self.assertEqual(tc.chill_gensrc, 'rose_somesrc.cu') - - def test_main_parse_chillbuild_dev(self): - tclist = main.args_to_tclist('-b {} -C {} build-chill-testcase'.format(self.staging_dir_bin, self.chill_dev_src).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'chill') - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.chill_dir, self.chill_dev_src) - self.assertEqual(tc.config.script_lang, 'script') - - def test_main_parse_chillbuild_lua_dev(self): - tclist = main.args_to_tclist('-b {} -C {} build-chill-testcase -i lua'.format(self.staging_dir_bin, self.chill_dev_src).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'chill-lua') - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.chill_dir, self.chill_dev_src) - self.assertEqual(tc.config.script_lang, 'lua') - - def test_main_parse_chillbuild_python_dev(self): - tclist = main.args_to_tclist('-b {} -C {} build-chill-testcase -i python'.format(self.staging_dir_bin, self.chill_dev_src).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'chill-python') - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.chill_dir, self.chill_dev_src) - self.assertEqual(tc.config.script_lang, 'python') - - def test_main_parse_chillbuild_cuda_dev(self): - tclist = main.args_to_tclist('-b {} -C {} build-chill-testcase -u'.format(self.staging_dir_bin, self.chill_dev_src).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'cuda-chill') - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.chill_dir, self.chill_dev_src) - self.assertEqual(tc.config.script_lang, 'lua') - - def test_main_parse_chillbuild_cuda_python_dev(self): - tclist = main.args_to_tclist('-b {} -C {} build-chill-testcase -u -i python'.format(self.staging_dir_bin, self.chill_dev_src).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'cuda-chill-python') - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.chill_dir, self.chill_dev_src) - self.assertEqual(tc.config.script_lang, 'python') - - def test_main_parse_chillbuild_release(self): - tclist = main.args_to_tclist('-b {} -C {} build-chill-testcase -v release'.format(self.staging_dir_bin, self.chill_dev_src).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'chill-release') - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.chill_dir, self.chill_dev_src) - self.assertEqual(tc.config.script_lang, 'script') - - def test_main_parse_chillbuild_cuda_release(self): - tclist = main.args_to_tclist('-b {} -C {} build-chill-testcase -u -v release'.format(self.staging_dir_bin, self.chill_dev_src).split(), coverage_set=gcov.GcovSet()) - tc = tclist[0] - self.assertEqual(tc.name, 'cuda-chill-release') - self.assertEqual(tc.config.bin_dir, self.staging_dir_bin) - self.assertEqual(tc.config.chill_dir, self.chill_dev_src) - self.assertEqual(tc.config.script_lang, 'lua') - - def test_main_tctree(self): - tclist = main.args_to_tclist('batch test-cases/unit/chill-basic.tclist'.split(), coverage_set=gcov.GcovSet()) - for tc in tclist: - runtest(tc) - - diff --git a/test-chill/unit-tests/test__cpp_validate_env.py b/test-chill/unit-tests/test__cpp_validate_env.py deleted file mode 100644 index e0225cd..0000000 --- a/test-chill/unit-tests/test__cpp_validate_env.py +++ /dev/null @@ -1,377 +0,0 @@ -import ast -import functools -import itertools -import pylang.debug -import random -import struct -import unittest - -import testchill -import testchill._cpp_validate_env as validate_env -import testchill.cpp_validate -import testchill.util - -## Support functions ## -class Point(object): - def __init__(self, x, y): - self.x = x - self.y = y - -def _compile_and_run(expr, target_type, bindings): - t = ast.fix_missing_locations(ast.Expression(expr.compile_expr(target_type))) - return eval(compile(t, '<string>', 'eval'), bindings) - -def _compile_and_invoke(expr, target_type, bindings, args): - t = ast.fix_missing_locations(ast.Expression(expr.compile_expr(target_type))) - return (eval(compile(t, '<string>', 'eval'), bindings))(*args) - -def _expr_test(tc, expr, fv_bindings, rt_bindings, target_type, exp_freevars, exp_value): - freevars = expr.getfreevars(fv_bindings) - value = _compile_and_run(expr, target_type, rt_bindings) - tc.assertEqual(exp_freevars, freevars) - tc.assertEqual(exp_value, value) - tc.assertEqual(target_type, type(value)) - -def _expr_test_list(tc, expr, fv_bindings, rt_bindings, target_type, exp_freevars, exp_value): - freevars = expr.getfreevars(fv_bindings) - value = _compile_and_run(expr, target_type, rt_bindings) - tc.assertEqual(exp_freevars, freevars) - tc.assertEqual(exp_value, value) - tc.assertEqual(list, type(value)) - -def _expr_test_invoke(tc, expr, fv_bindings, rt_bindings, target_type, exp_freevars, invoke_args, exp_value): - freevars = expr.getfreevars(fv_bindings) - value = _compile_and_invoke(expr, target_type, rt_bindings, invoke_args) - tc.assertEqual(exp_freevars, freevars) - tc.assertEqual(exp_value, value) - tc.assertEqual(target_type.exprtype, type(value)) - -def lambdatype(param_types, etype): - return validate_env._pylambdatype(param_types, etype) - -def arraytype(dims, etype): - return validate_env._pyarraytype(dims, etype) - - -## Test case class ## -class Test_CppValidateEnv(unittest.TestCase): - def setUp(self): - ### data for the abstract syntax tree ### - _const_4 = validate_env._ConstantExpr('4') - _const_3 = validate_env._ConstantExpr('3') - _const_2 = validate_env._ConstantExpr('2') - _const_0 = validate_env._ConstantExpr('0') - _name_x = validate_env._NameExpr('x') - _name_y = validate_env._NameExpr('y') - _name_p = validate_env._NameExpr('p') - _name_pow = validate_env._NameExpr('pow') - _attr_px = validate_env._AttributeExpr(_name_p, 'x') - _attr_py = validate_env._AttributeExpr(_name_p, 'y') - _add_3_2 = validate_env._BinExpr(_const_3, '+', _const_2) - _add_x_2 = validate_env._BinExpr(_name_x, '+', _const_2) - _pow_x_2 = validate_env._BinExpr(_name_x, '**', _const_2) - - _name_i = validate_env._NameExpr('i') - _lambda_i = validate_env._LambdaExpr(['i'],_name_i) - - _name_j = validate_env._NameExpr('j') - _const_10 = validate_env._ConstantExpr('10') - _mul_i_10 = validate_env._BinExpr(_name_i, '*', _const_10) - _add_mul_i_10_j = validate_env._BinExpr(_mul_i_10, '+', _name_j) - _lambda_ij = validate_env._LambdaExpr(['i','j'],_add_mul_i_10_j) - - self._ConstantExpr_test_data = [ - (('3',), set(), dict(), int, set(), int(3)), - (('3',), set(), dict(), float, set(), float(3)) - ] - self._NameExpr_test_data = [ - (('x',), set(), {'x':3}, int, {'x'}, int(3)), - (('x',), {'x'}, {'x':3}, int, set(), int(3)) - ] - self._AttributeExpr_test_data = [ - ((validate_env._NameExpr('p'),'x'), set(), {'p':Point(3,0)}, int, {'p'}, int(3)), - ((validate_env._NameExpr('p'),'x'), {'p'}, {'p':Point(3,0)}, int, set(), int(3)) - ] - self._BinExpr_test_data = [ - ((_const_3, '+', _const_2), set(), dict(), int, set(), int(5)), - ((_const_3, '+', _const_2), set(), dict(), float, set(), float(5)), - ((_name_x, '+', _const_2), set(), {'x':3}, int, {'x'}, int(5)), - ((_name_x, '+', _const_2), {'x'}, {'x':3}, int, set(), int(5)), - ((_const_3, '+', _name_x), set(), {'x':2}, int, {'x'}, int(5)), - ((_const_3, '+', _name_x), {'x'}, {'x':2}, int, set(), int(5)), - ((_const_3, '-', _const_2), set(), dict(), int, set(), int(1)), - ((_const_3, '*', _const_2), set(), dict(), int, set(), int(6)), - ((_const_3, '/', _const_2), set(), dict(), int, set(), int(1)), - ((_const_3, '**', _const_2), set(), dict(), int, set(), int(9)) - ] - self._UnaryExpr_test_data = [ - (('-', _const_3), set(), dict(), int, set(), int(-3)), - (('-', _add_3_2), set(), dict(), int, set(), int(-5)), - (('-', _add_x_2), set(), {'x':3}, int, {'x'}, int(-5)), - (('-', _add_x_2), {'x'}, {'x':3}, int, set(), int(-5)) - ] - self._LambdaExpr_test_data = [ - (([],_const_3), set(), dict(), lambdatype([],int), set(), tuple(), int(3)), - (([],_name_x), set(), {'x':3}, lambdatype([],int), {'x'}, tuple(), int(3)), - ((['x'],_pow_x_2), set(), dict(), lambdatype([int],int), set(), (int(4),), int(16)) - ] - self._InvokeExpr_test_data = [ - ((_name_pow,[_const_3, _const_2]), set(), dict(), int, {'pow'}, int(9)), - ] - self._MatrixGenerator_test_data = [ - (([_const_2],_lambda_i), set(), {'_pyitertools': itertools}, arraytype([None],int), set(), [0, 1]), - (([None],_lambda_i), set(), {'_pyitertools': itertools}, arraytype([_const_2],int), set(), [0, 1]), - (([_const_2,_const_3],_lambda_ij), set(), {'_pyitertools': itertools}, arraytype([_const_2,_const_3], int), set(), [0, 1, 2, 10, 11, 12]), - (([_const_2,_const_3],_lambda_ij), set(), {'_pyitertools': itertools}, arraytype([None,None], int), set(), [0, 1, 2, 10, 11, 12]), - (([_const_2,None],_lambda_ij), set(), {'_pyitertools': itertools}, arraytype([None,_const_3], int), set(), [0, 1, 2, 10, 11, 12]), - (([None,_const_3],_lambda_ij), set(), {'_pyitertools': itertools}, arraytype([_const_2,None], int), set(), [0, 1, 2, 10, 11, 12]), - (([None,None],_lambda_ij), set(), {'_pyitertools': itertools}, arraytype([_const_2,_const_3], int), set(), [0, 1, 2, 10, 11, 12]), - (([_name_x],_lambda_i), set(), {'_pyitertools': itertools, 'x':2}, arraytype([None],int), {'x'}, [0, 1]), - (([None],_lambda_i), set(), {'_pyitertools': itertools, 'x':2}, arraytype([_name_x],int), set(), [0, 1]), - ] - self._RandomExpr_test_state = random.getstate() - self._RandomExpr_test_data = [ - ((_const_0,_const_4), set(), {'_pyrandom': random}, int, set(), int(random.random()*4)), - ((_const_0,_name_x), set(), {'_pyrandom': random, 'x':4}, int, {'x'}, int(random.random()*4)), - ((_name_x,_const_4), set(), {'_pyrandom': random, 'x':0}, int, {'x'}, int(random.random()*4)), - ] - ### data for data generating ### - _name_ambn = validate_env._NameExpr('ambn') - _name_an = validate_env._NameExpr('an') - _name_bm = validate_env._NameExpr('bm') - _name_even2 = validate_env._NameExpr('evendist2') - _lambda_ij_0 = validate_env._LambdaExpr(['i','j'],_const_0) - _matrix_2_an_ambn_even2 = validate_env._MatrixGenerator([_name_an,_name_ambn],_name_even2) - _matrix_2_ambn_bm_even2 = validate_env._MatrixGenerator([_name_ambn,_name_bm],_name_even2) - _matrix_2_an_bm_lambda_ij_0 = validate_env._MatrixGenerator([_name_an,_name_bm],_lambda_ij_0) - _add_an_bm = validate_env._BinExpr(_name_an, '+', _name_bm) - _int_type = validate_env._CppPrimitiveType.get_from_cppname('int') - _float_type = validate_env._CppPrimitiveType.get_from_cppname('float') - _float_ptr_type = validate_env._CppPointerType(_float_type) - _param_A = validate_env._Parameter('A', _float_ptr_type,'in', _matrix_2_an_ambn_even2) - _param_B = validate_env._Parameter('B', _float_ptr_type,'in', _matrix_2_ambn_bm_even2) - _param_C = validate_env._Parameter('C', _float_ptr_type,'out',_matrix_2_an_bm_lambda_ij_0) - _param_ambn = validate_env._Parameter('ambn',_int_type, 'in', _add_an_bm) - _param_an = validate_env._Parameter('an', _int_type, 'in', _const_2) - _param_bm = validate_env._Parameter('bm', _int_type, 'in', _const_3) - self._Parameter_order_by_freevars_test_data = [ - ([_param_A, _param_B, _param_C, _param_ambn, _param_an, _param_bm], ['an','bm','C','ambn','A','B']) - ] - _float_3_type = validate_env._CppArrayType(_float_type, [_const_3]) - _float_3_2_type = validate_env._CppArrayType(_float_type, [_const_3,_const_2]) - _name_N = validate_env._NameExpr('N') - _float_N_type = validate_env._CppArrayType(_float_type, [_name_N]) - _float_N_2_type = validate_env._CppArrayType(_float_type, [_name_N,_const_2]) - self._CppType_statictype_test_data = [ - ((_int_type, dict()), 'int'), - ((_float_ptr_type, dict()), 'float*'), - ((_float_3_type, dict()), 'float[3]'), - ((_float_N_type, {'N': 3}), 'float[3]'), - ((_float_N_2_type, {'N': 3}), 'float[3][2]') - ] - _int_ptr_type = validate_env._CppPointerType(_int_type) - _int_ptr_ptr_type = validate_env._CppPointerType(_int_ptr_type) - _int_3_type = validate_env._CppArrayType(_int_type, [_const_3]) - _int_N_type = validate_env._CppArrayType(_int_type, [_name_N]) - _int_3_2_type = validate_env._CppArrayType(_int_type, [_const_3, _const_2]) - joinbytes = lambda b: functools.reduce(lambda a,v: a+v,b) - self._CppType_formatdata_test_data = [ - ((_int_type, dict(), 3), ([1], struct.pack('i',3))), - ((_float_type, dict(), float(3)), ([1], struct.pack('f',float(3)))), - ((_int_3_type, dict(), list(range(3))), ([3], joinbytes([struct.pack('i',i) for i in range(3)]))), - ((_int_3_2_type, dict(), list(range(6))), ([3,2], joinbytes([struct.pack('i',i) for i in range(6)]))), - ((_int_ptr_type, dict(), 3), ([1,1], struct.pack('i',3))), - ((_int_ptr_type, dict(), list(range(3))), ([3,1], joinbytes([struct.pack('i',i) for i in range(3)]))), - ((_int_ptr_ptr_type, dict(), list(range(3))), ([3,1,1], joinbytes([struct.pack('i',i) for i in range(3)]))), - ((_int_ptr_ptr_type, dict(), [[0,1,2],[3,4,5]]), ([2,3,1], joinbytes([struct.pack('i',i) for i in range(6)]))), - ] - evendist2 = lambda i,j: random.random() - random.seed(0) - self._Parameter_generatedata_test_state = random.getstate() - if testchill.util.python_version_major == 2: - self._Parameter_generatedata_test_data = [ - ((_param_A, {'an':2, 'ambn':5,'evendist2':evendist2}), ('A', 'float*', [10, 1], '\x08,X?M\tB?)U\xd7>\xbc\x90\x84>\xe6\xe2\x02?\x87S\xcf>\x06\xa7H?\xceK\x9b>\x84\x04\xf4>\x86X\x15?')), - ((_param_B, {'ambn':5, 'bm':3,'evendist2':evendist2}), ('B', 'float*', [15, 1], '\x16zh?(3\x01?\rM\x90>b|A?nM\x1e?^B\x80>!\xe5h?\xd4\x97{?fjO?Y\xf4f?\xaa\xcb\x9e>A\xd6:?D\x1af?\x92\x19/?\xb1\xbc\xf1>')), - ((_param_C, {'an':2, 'bm':3, 'evendist2':evendist2}), ('C', 'float*', [6, 1], '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')), - ((_param_ambn, {'an':2, 'bm':3}), ('ambn', 'int', [1], '\x05\x00\x00\x00')), - ((_param_an, dict()), ('an', 'int', [1], '\x02\x00\x00\x00')), - ((_param_bm, dict()), ('bm', 'int', [1], '\x03\x00\x00\x00')) - ] - else: - self._Parameter_generatedata_test_data = [ - ((_param_A, {'an':2, 'ambn':5,'evendist2':evendist2}), ('A', 'float*', [10, 1], b'\x08,X?M\tB?)U\xd7>\xbc\x90\x84>\xe6\xe2\x02?\x87S\xcf>\x06\xa7H?\xceK\x9b>\x84\x04\xf4>\x86X\x15?')), - ((_param_B, {'ambn':5, 'bm':3,'evendist2':evendist2}), ('B', 'float*', [15, 1], b'\x16zh?(3\x01?\rM\x90>b|A?nM\x1e?^B\x80>!\xe5h?\xd4\x97{?fjO?Y\xf4f?\xaa\xcb\x9e>A\xd6:?D\x1af?\x92\x19/?\xb1\xbc\xf1>')), - ((_param_C, {'an':2, 'bm':3, 'evendist2':evendist2}), ('C', 'float*', [6, 1], b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')), - ((_param_ambn, {'an':2, 'bm':3}), ('ambn', 'int', [1], b'\x05\x00\x00\x00')), - ((_param_an, dict()), ('an', 'int', [1], b'\x02\x00\x00\x00')), - ((_param_bm, dict()), ('bm', 'int', [1], b'\x03\x00\x00\x00')) - ] - ### data for parsing ### - self.parse_procedure_test_data = [ - (('procedure void q()',), ('void', 'q', 0)), - (('procedure int q()',), ('int', 'q', 0)), - (('procedure float q()',), ('float', 'q', 0)), - (('procedure unsigned int q()',), ('unsigned int', 'q', 0)), - (('procedure void q(in int x)',), ('void', 'q', 1)), - (('procedure void q(in int x, in int y)',), ('void', 'q', 2)), - ] - _mm_proc_expr = ''' - procedure void mm( - in float* A = matrix([an,ambn],evendist2), - in float* B = matrix([ambn,bm],evendist2), - out float* C = matrix([an,bm],lambda i,j: 0), - in int ambn = an + bm, - in int an = 2, - in int bm = 3) - ''' - self.parse_parameter_test_data = [ - (('procedure void mm(in int x)',), [(0, 'x', 'int', 'in', False, set())]), - (('procedure void mm(out int* x = 10)',), [(0, 'x', 'int*', 'out', True, set())]), - ((_mm_proc_expr,),[ - (0, 'A', 'float*', 'in', True, set(['an','ambn','evendist2'])), - (1, 'B', 'float*', 'in', True, set(['ambn','bm','evendist2'])), - (2, 'C', 'float*', 'out', True, set(['an','bm'])), - (3, 'ambn', 'int', 'in', True, set(['an','bm'])), - (4, 'an', 'int', 'in', True, set([])), - (5, 'bm', 'int', 'in', True, set([])) - ]), - ] - ### data for code generation ### - _float_2d_type = validate_env._CppArrayType(_float_type, [_name_an,_name_ambn]) - self._CppType_statictype_test_data = [ - ((_float_2d_type, {'an':2,'ambn':5}), 'float[2][5]') - ] - self._CppType_get_cdecl_stmt_test_data = [ - ((_float_2d_type, 'A', {'an':2,'ambn':5}), 'float A[2][5];') - ] - self._CppType_get_cread_stmt_test_data = [ - ((_float_2d_type, 'A', {'an':2,'ambn':5}, 'datafile_initialize', [10,1]), 'datafile_initialize.read((char*)A, 10*sizeof(float));') - ] - self._CppType_get_cwrite_stmt_test_data = [ - ((_float_2d_type, 'A', {'an':2,'ambn':5}, 'datafile_out', [10,1]), 'datafile_out.write((char*)A, 10*sizeof(float));') - ] - - def run_expr_test_data(self, ctor, test_data): - for ctor_args, fv_bindings, rt_bindings, target_type, exp_freevars, exp_value in test_data: - expr = ctor(*ctor_args) - _expr_test(self, expr, fv_bindings, rt_bindings, target_type, exp_freevars, exp_value) - - def run_expr_test_data_list(self, ctor, test_data): - for ctor_args, fv_bindings, rt_bindings, target_type, exp_freevars, exp_value in test_data: - expr = ctor(*ctor_args) - _expr_test_list(self, expr, fv_bindings, rt_bindings, target_type, exp_freevars, exp_value) - - def run_expr_test_data_invoke(self, ctor, test_data): - for ctor_args, fv_bindings, rt_bindings, target_type, exp_freevars, invoke_args, exp_value in test_data: - expr = ctor(*ctor_args) - _expr_test_invoke(self, expr, fv_bindings, rt_bindings, target_type, exp_freevars, invoke_args, exp_value) - - def test__ConstantExpr(self): - self.run_expr_test_data(validate_env._ConstantExpr, self._ConstantExpr_test_data) - - def test__NameExpr(self): - self.run_expr_test_data(validate_env._NameExpr, self._NameExpr_test_data) - - def test__AttributeExpr(self): - self.run_expr_test_data(validate_env._AttributeExpr, self._AttributeExpr_test_data) - - def test__UnaryExpr(self): - self.run_expr_test_data(validate_env._UnaryExpr, self._UnaryExpr_test_data) - - def test__LambdaExpr(self): - self.run_expr_test_data_invoke(validate_env._LambdaExpr, self._LambdaExpr_test_data) - - def test__InvokeExpr(self): - self.run_expr_test_data(validate_env._InvokeExpr, self._InvokeExpr_test_data) - - def test__MatrixGenerator(self): - self.run_expr_test_data_list(validate_env._MatrixGenerator, self._MatrixGenerator_test_data) - - def test__RandomExpr(self): - random.setstate(self._RandomExpr_test_state) - self.run_expr_test_data(validate_env._RandomExpr, self._RandomExpr_test_data) - - def test_parse_procedure(self): - parse_func = testchill.cpp_validate._parse_testproc_script - for args, expected in self.parse_procedure_test_data: - rtype_exp, name_exp, param_count_exp = expected - proc = parse_func(*args) - self.assertEqual(str(proc.rtype), rtype_exp) - self.assertEqual(proc.name, name_exp) - self.assertEqual(len(proc.parameters), param_count_exp) - - def test_parse_parameter(self): - #pylang.debug.enable(['pylang.parser.BaseTextParser.parse']) - parse_func = testchill.cpp_validate._parse_testproc_script - for args, expected in self.parse_parameter_test_data: - proc = parse_func(*args) - for param_exp in expected: - index, name_exp, ctype_exp, direction_exp, has_init_exp, freevars_exp = param_exp - param = proc.parameters[index] - self.assertEqual(param.name, name_exp) - self.assertEqual(str(param.cpptype), ctype_exp) - self.assertEqual(param.direction, direction_exp) - self.assertEqual(param.init_expr is not None, has_init_exp) - self.assertEqual(param.getfreevars(), freevars_exp) - #pylang.debug.enable(['pylang.parser.BaseTextParser.parse'], False) - - def test__Parameter_order_by_freevars(self): - def testfunc(param_list): - return [p.name for p in validate_env._Parameter.order_by_freevars(param_list)] - for arg, expected in self._Parameter_order_by_freevars_test_data: - self.assertEqual(testfunc(arg),expected) - - def test__CppType_statictype(self): - def testfunc(ctype, glbls): - return str(ctype.statictype(glbls)) - for args, expected in self._CppType_statictype_test_data: - self.assertEqual(testfunc(*args), expected) - - def test__CppType_formatdata(self): - def testfunc(ctype, glbls, data): - return ctype.statictype(glbls).formatdata(data) - for args, expected in self._CppType_formatdata_test_data: - dim_exp, bytes_exp = expected - dim_val, bytes_val = testfunc(*args) - self.assertEqual(dim_val, dim_exp) - self.assertEqual(bytes_val, bytes_exp) - - def test__CppType_statictype(self): - def testfunc(t, bindings): - return str(t.statictype(bindings)) - for args, typename in self._CppType_statictype_test_data: - self.assertEqual(testfunc(*args), typename) - - def test__CppType_get_cdecl_stmt(self): - def testfunc(t, param_name, bindings): - return t.statictype(bindings).get_cdecl_stmt(param_name) - for args, decl_exp in self._CppType_get_cdecl_stmt_test_data: - decl_val = testfunc(*args) - self.assertEqual(decl_val, decl_exp) - - def test__CppType_get_cread_stmt(self): - def testfunc(t, param_name, bindings, stream, dims): - return t.statictype(bindings).get_cread_stmt(param_name, stream, dims) - for args, decl_exp in self._CppType_get_cread_stmt_test_data: - decl_val = testfunc(*args) - self.assertEqual(decl_val, decl_exp) - - def test__CppType_get_cwrite_stmt(self): - def testfunc(t, param_name, bindings, stream, dims): - return t.statictype(bindings).get_cwrite_stmt(param_name, stream, dims) - for args, decl_exp in self._CppType_get_cwrite_stmt_test_data: - decl_val = testfunc(*args) - self.assertEqual(decl_val, decl_exp) - - def test__Parameter_generatedata(self): - def testfunc(param, glbls): - return param.generatedata(glbls) - for args, expected in self._Parameter_generatedata_test_data: - name_val, type_val, dims_val, data_val = testfunc(*args) - name_exp, type_exp, dims_exp, data_exp = expected - #print((name_val,type_val,dims_val,data_val)) - self.assertEqual(name_val, name_exp) - self.assertEqual(str(type_val), type_exp) - self.assertEqual(dims_val, dims_exp) - self.assertEqual(data_val, data_exp) - diff --git a/test-chill/unit-tests/test__extract.py b/test-chill/unit-tests/test__extract.py deleted file mode 100644 index 72cba8a..0000000 --- a/test-chill/unit-tests/test__extract.py +++ /dev/null @@ -1,48 +0,0 @@ -import ast -import unittest - -import testchill._extract as _extract -import testchill.util as util - -class TestExtraction(unittest.TestCase): - def setUp(self): - self._TagExtractor_parse_test_data = [ - (('a',''), []), - (('a','x<a>yy</a>z'), [('yy', {})]), - (('a','x<a>yy</a>z<a>ww</a>g'), [('yy', {}), ('ww',{})]), - (('a','x<a>yy</a>z<b>ww</b>g'), [('yy', {})]) - ] - self._commented_test_data = [ - (('no comment here','cc'), []), - (('one comment //xxx\n','cc'), ['xxx']), - (('two comments //xxx\nunrelated//yyy\n', 'cc'), ['xxx','yyy']), - (('two comments //xxx\nunrelated//yyy', 'cc'), ['xxx','yyy']), - (('ss/*x\ny\n*/z','cc'),['x\ny\n']), - (('ss/*x\ny\n*/z//q\nc','cc'),['x\ny\n','q']), - (('ss###x#\n','py'),['x#']), - (('ss"""x"""\n','py'),['x']) - ] - - def test__commented(self): - def run(txt, ext): - return list(_extract._TagExtractor._commented(txt, ext)) - for args, res in self._commented_test_data: - self.assertEqual(run(*args), res) - - #def test_extract(self): - # def testfunc(tag, txt): - # temp = util.mktemp() - # with open(temp, 'w') as f: - # f.write(txt) - # extracted = _extract._TagExtractor.extract_tag(tag, temp) - # util.rmtemp() - # return extracted - # - # for args, res in self.test_extract_data: - # self.assertEqual(testfunc(*args), res) - - def test__TagExtractor_parse(self): - def testfunc(tag, txt): - return _extract._TagExtractor._parse(tag, txt) - for args, exp in self._TagExtractor_parse_test_data: - self.assertEqual(testfunc(*args), exp) diff --git a/test-chill/unit-tests/test_chill.py b/test-chill/unit-tests/test_chill.py deleted file mode 100644 index 8aaebfe..0000000 --- a/test-chill/unit-tests/test_chill.py +++ /dev/null @@ -1,215 +0,0 @@ -import logging -import os -import unittest - -import testchill.chill -import testchill.gcov -import testchill.test -import testchill.util - - -_runbuild=True - -def runtest(tclist): - if _runbuild: - for tc in tclist: - tc.setUp() - tc.setresult(tc.run()) - tc.tearDown() - -def runchilltest(tclist, runvalidate=False, runstdout=False): - for tc in tclist: - tc.setUp() - tc.compile_src(tc) - tc.run_script(tc) - tc.compile_gensrc(tc) - if runvalidate: - tc.check_run_script_validate(tc) - if runstdout: - tc.check_run_script_stdout(tc) - tc.tearDown() - -class TestChillTestCases(unittest.TestCase): - def config(self, **kwargs): - cargs = { - 'omega_dir': self.omega_dev_dir, - 'chill_dir': self.chill_dev_dir, - 'bin_dir': self.bin_dir, - 'build_cuda': False, - 'script_lang': None, - 'version': 'dev' - } - cargs.update(kwargs) - return testchill.chill.ChillConfig(**cargs) - - def config_rel(self, **kwargs): - kwargs['version'] = 'release' - kwargs['omega_dir'] = self.omega_rel_dir - kwargs['chill_dir'] = self.chill_rel_dir - return self.config(**kwargs) - - def setUp(self): - self.chill_dev_dir = os.getenv('CHILL_DEV_SRC') - self.chill_rel_dir = os.getenv('CHILL_RELEASE_SRC') - self.omega_dev_dir = os.getenv('OMEGA_DEV_SRC') - self.omega_rel_dir = os.getenv('OMEGA_RELEASE_SRC') - self.bin_dir = os.getenv('STAGING_DIR_BIN') - self.wd = os.getenv('STAGING_DIR_WD') - self.build_options = {'coverage':False} - - testchill.util.shell('cp', [os.path.join(self.chill_dev_dir, 'examples/cuda-chill/cudaize.lua'), self.wd]) - testchill.util.shell('cp', [os.path.join(self.chill_dev_dir, 'examples/cuda-chill/cudaize.py'), self.wd]) - - self.config_test_func = { - 0: lambda conf: conf.default_script_lang(), - 1: lambda conf: conf.name(), - 2: lambda conf: conf.make_depend_target(), - 3: lambda conf: conf.make_target(), - 4: lambda conf: conf.make_args() - } - self.config_test_data = [ - ((self.omega_dev_dir, self.chill_dev_dir, self.bin_dir, False, None, 'dev'), ('script', 'chill', 'depend-chill', 'chill')), - ((self.omega_dev_dir, self.chill_dev_dir, self.bin_dir, False, 'lua', 'dev'), ('script', 'chill-lua', 'depend-chill', 'chill')), - ((self.omega_dev_dir, self.chill_dev_dir, self.bin_dir, False, 'python', 'dev'), ('script', 'chill-python', 'depend-chill', 'chill')), - ((self.omega_dev_dir, self.chill_dev_dir, self.bin_dir, True, None, 'dev'), ('lua', 'cuda-chill', 'depend-cuda-chill', 'cuda-chill')), - ((self.omega_dev_dir, self.chill_dev_dir, self.bin_dir, True, 'python', 'dev'), ('lua', 'cuda-chill-python', 'depend-cuda-chill', 'cuda-chill')), - ((self.omega_rel_dir, self.chill_rel_dir, self.bin_dir, False, None, 'release'), ('script', 'chill-release', 'depend', 'chill')), - ((self.omega_rel_dir, self.chill_rel_dir, self.bin_dir, True, None, 'release'), ('lua', 'cuda-chill-release', 'depend-cuda-chill', 'cuda-chill')) - ] - - def tearDown(self): - pass - - def _run_ChillConfig_test(self, n): - for args, expected in self.config_test_data: - val = self.config_test_func[n](testchill.chill.ChillConfig(*args)) - exp = expected[n] - self.assertEqual(val, exp) - - def test_ChillConfig_default_script_lang(self): - self._run_ChillConfig_test(0) - - def test_ChillConfig_name(self): - self._run_ChillConfig_test(1) - - def test_ChillConfig_make_depend_target(self): - self._run_ChillConfig_test(2) - - def test_ChillConfig_make_target(self): - self._run_ChillConfig_test(3) - - #def test_ChillConfig_make_args(self): - # self._run_ChillConfig_test(4) - - def test_chill_dev(self): - tc = testchill.chill.BuildChillTestCase(self.config(), self.build_options) - self.assertEqual(tc.config.name(), 'chill') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_dev_dir) - self.assertEqual(tc.config.make_depend_target(), 'depend-chill') - self.assertEqual(tc.config.make_target(), 'chill') - self.assertEqual(tc.name, 'chill') - logging.info('Building ' + tc.name) - runtest([tc]) - - def test_chill_dev_lua(self): - tc = testchill.chill.BuildChillTestCase(self.config(script_lang='lua'), self.build_options) - self.assertEqual(tc.config.name(), 'chill-lua') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_dev_dir) - self.assertEqual(tc.config.make_depend_target(), 'depend-chill') - self.assertEqual(tc.config.make_target(), 'chill') - self.assertEqual(tc.config.make_args(), 'SCRIPT_LANG=lua') - self.assertEqual(tc.name, 'chill-lua') - logging.info('Building ' + tc.name) - runtest([tc]) - - def test_chill_dev_python(self): - tc = testchill.chill.BuildChillTestCase(self.config(script_lang='python'), self.build_options) - self.assertEqual(tc.config.name(), 'chill-python') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_dev_dir) - self.assertEqual(tc.config.make_depend_target(), 'depend-chill') - self.assertEqual(tc.config.make_target(), 'chill') - self.assertEqual(tc.config.make_args(), 'SCRIPT_LANG=python') - self.assertEqual(tc.name, 'chill-python') - logging.info('Building ' + tc.name) - runtest([tc]) - - def test_cudachill_dev(self): - tc = testchill.chill.BuildChillTestCase(self.config(build_cuda=True), self.build_options) - self.assertEqual(tc.config.name(), 'cuda-chill') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_dev_dir) - self.assertEqual(tc.config.make_depend_target(), 'depend-cuda-chill') - self.assertEqual(tc.config.make_target(), 'cuda-chill') - self.assertEqual(tc.name, 'cuda-chill') - logging.info('Building ' + tc.name) - runtest([tc]) - - def test_cudachill_dev(self): - tc = testchill.chill.BuildChillTestCase(self.config(build_cuda=True, script_lang='python'), self.build_options) - self.assertEqual(tc.config.name(), 'cuda-chill-python') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_dev_dir) - self.assertEqual(tc.config.make_depend_target(), 'depend-cuda-chill') - self.assertEqual(tc.config.make_target(), 'cuda-chill') - self.assertEqual(tc.name, 'cuda-chill-python') - logging.info('Building ' + tc.name) - runtest([tc]) - - def test_chill_release(self): - tc = testchill.chill.BuildChillTestCase(self.config_rel(), self.build_options) - self.assertEqual(tc.config.name(), 'chill-release') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_rel_dir) - self.assertEqual(tc.config.make_depend_target(), 'depend') - self.assertEqual(tc.config.make_target(), 'chill') - self.assertEqual(tc.name, 'chill-release') - logging.info('Building ' + tc.name) - runtest([tc]) - - def test_cudachill_release(self): - tc = testchill.chill.BuildChillTestCase(self.config_rel(build_cuda=True), self.build_options) - self.assertEqual(tc.config.name(), 'cuda-chill-release') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_rel_dir) - self.assertEqual(tc.config.env()['CUDACHILL'], 'true') - self.assertEqual(tc.config.make_depend_target(), 'depend-cuda-chill') - self.assertEqual(tc.config.make_target(), 'cuda-chill') - self.assertEqual(tc.name, 'cuda-chill-release') - logging.info('Building ' + tc.name) - runtest([tc]) - - def test_run_chill(self): - config = self.config() - btc = testchill.chill.BuildChillTestCase(config, self.build_options) - runtest([btc]) - tc = testchill.chill.RunChillTestCase(config, 'test-cases/chill/test_scale.script', 'test-cases/chill/mm.c', wd=self.wd) - self.assertEqual(tc.chill_src, 'mm.c') - self.assertEqual(tc.chill_script, 'test_scale.script') - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'test-cases/chill/mm.c')) - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'test-cases/chill/test_scale.script')) - self.assertEqual(tc.chill_gensrc, 'rose_mm.c') - self.assertEqual(tc.name, 'chill:test_scale.script') - runchilltest([tc]) - - def test_run_cudachill(self): - config = self.config(build_cuda=True) - btc = testchill.chill.BuildChillTestCase(config, self.build_options) - runtest([btc]) - tc = testchill.chill.RunChillTestCase(config, 'test-cases/examples/cuda-chill/mm.lua', 'test-cases/examples/cuda-chill/mm.c', wd=self.wd) - self.assertEqual(tc.chill_src, 'mm.c') - self.assertEqual(tc.chill_script, 'mm.lua') - self.assertEqual(tc.chill_src_path, os.path.join(os.getcwd(), 'test-cases/examples/cuda-chill/mm.c')) - self.assertEqual(tc.chill_script_path, os.path.join(os.getcwd(), 'test-cases/examples/cuda-chill/mm.lua')) - self.assertEqual(tc.chill_gensrc, 'rose_mm.cu') - self.assertEqual(tc.name, 'cuda-chill:mm.lua') - runchilltest([tc]) - - def test_chill_coverage(self): - tc = testchill.chill.BuildChillTestCase(self.config(), options={'coverage':True}, coverage_set=testchill.gcov.GcovSet()) - self.assertEqual(tc.config.name(), 'chill') - self.assertEqual(tc.config.env()['OMEGAHOME'], self.omega_dev_dir) - self.assertEqual(tc.config.make_depend_target(), 'depend-chill') - self.assertEqual(tc.config.make_target(), 'chill') - self.assertEqual(tc.name, 'chill') - self.assertTrue(tc.options['coverage']) - logging.info('Building ' + tc.name) - if _runbuild: - runtest([tc]) - self.assertTrue(os.path.exists(os.path.join(self.chill_dev_dir, 'ir_rose.gcno'))) - diff --git a/test-chill/unit-tests/test_cpp_validate.py b/test-chill/unit-tests/test_cpp_validate.py deleted file mode 100644 index ed55c80..0000000 --- a/test-chill/unit-tests/test_cpp_validate.py +++ /dev/null @@ -1,280 +0,0 @@ -import functools -import os -import pprint -import struct -import unittest - -import testchill -import testchill.util as util -import testchill._cpp_validate_env as cpp_validate_env -import testchill.cpp_validate as cpp_validate - - -def listtodata(flist): - data = [struct.pack('f',n) for n in flist] - return functools.reduce(lambda a,v: a+v, data) - -class TestCppValidate(unittest.TestCase): - def setUp(self): - self.staging_dir_wd = os.getenv("STAGING_DIR_WD") - self.cpp_validate_dir = os.path.join(os.getcwd(),'unit-tests/cpp_validate_prog/') - self._parse_testproc_script_test_data = [ - (('mm_one.testproc',), None), - (('mm_one_with.testproc',), None) - ] - self._parse_testproc_python_test_data = [ - ] - #self._generate_data_test_data = [ - # (('mm_one.cc','in'), None), - # (('mm_one.cc','out'), None), - # (('mm_one_with.cc','in'), None), - # (('mm_one_with.cc','out'), None), - # (('mm_one_defines.cc','in'), None), - # (('mm_one_defines.cc','out'), None), - # (('mm_one_with_defines.cc','in'), None), - # (('mm_one_with_defines.cc','out'), None), - # ] - self._parse_testproc_iter_test_data = [ - (('mm_one.cc',), - [({'lang': 'script', 'name': 'mm_small', 'define':'dict()'},)]), - (('mm_one_with.cc',), - [({'lang': 'script', 'name': 'mm_small', 'define':'dict()'},)]), - (('mm_one_defines.cc',), - [({'lang': 'script', 'name': 'mm_small', 'define': "{'AN':3, 'BM':2, 'AMBN':5}"},)]), - (('mm_one_with_defines.cc',), - [({'lang': 'script', 'name': 'mm_small', 'define': "{'AN':3, 'BM':2, 'AMBN':5}"},)]) - ] - self._compile_gpp_test_data = [ - ('mm_one_main.cc', 'mm_one') - ] - self._test_time_test_data = [ - ((0.0034, 0.0025), True), - ((0.0025, 0.0034), False) - ] - self._test_validate_test_data = [ - (('asdf', 'asdf'), True), - (('asdf', 'sdfg'), False) - ] - self._run_test_validate_time_test_data = [ - (('mm_one_main.cc', 'mm_control', 'mm_one_longer_main.cc', 'mm_test', list(range(15)) + list(range(10))), (True, False)), - (('mm_one_longer_main.cc', 'mm_control', 'mm_one_main.cc', 'mm_test', list(range(15)) + list(range(10))), (True, True)), - (('mm_one_main.cc', 'mm_control', 'mm_one_longer_wrong_main.cc', 'mm_test', list(range(15)) + list(range(10))), (False, False)) - ] - self._compile_run_test_validate_time_test_data = [ - (('mm_one_main.cc', 'mm_one_longer_main.cc', list(range(15)) + list(range(10))), (True, False)), - (('mm_one_longer_main.cc', 'mm_one_main.cc', list(range(15)) + list(range(10))), (True, True)), - (('mm_one_main.cc', 'mm_one_longer_wrong_main.cc', list(range(15)) + list(range(10))), (False, False)) - ] - self._generate_initial_data_test_data = [ - (('mm_one.testproc', 'mm.cc', {}), listtodata(list(range(15)) + list(range(10)) + [0]*6)), - (('mm_one_with.testproc', 'mm.cc', {}), listtodata(list(range(15)) + list(range(10)) + [0]*6)), - ] - self._format_insertion_dict_test_data = [ - (('mm_one.testproc', 'mm_one.cc', {}), - { - 'run': 'mm(A,B,C);', - 'read-out': 'datafile_initialize.read((char*)C, 6*sizeof(float));', - 'declarations': 'float A[3][5];\nfloat B[5][2];\nfloat C[3][2];', - 'write-out': 'datafile_out.write((char*)C, 6*sizeof(float));', - 'defines': '', - 'read-in': 'datafile_initialize.read((char*)A, 15*sizeof(float));\ndatafile_initialize.read((char*)B, 10*sizeof(float));' - }), - (('mm_one_with.testproc', 'mm_one.cc', {}), - { - 'run': 'mm(A,B,C);', - 'read-out': 'datafile_initialize.read((char*)C, 6*sizeof(float));', - 'declarations': 'float A[3][5];\nfloat B[5][2];\nfloat C[3][2];', - 'write-out': 'datafile_out.write((char*)C, 6*sizeof(float));', - 'defines': '', - 'read-in': 'datafile_initialize.read((char*)A, 15*sizeof(float));\ndatafile_initialize.read((char*)B, 10*sizeof(float));' - }), - ] - self._write_generated_code_test_data = [ - (('mm_one.testproc', 'mm_one.cc', 'control.cc', {}), 'mm_one_out.cc') - ] - self.run_from_src_test_data = [ - (('mm_three_basic.cc', 'mm_three_slow.cc', self.staging_dir_wd), [('small', (True, False)), ('medium', (True, False)), ('big', (True, False))]), - (('mm_three_slow.cc', 'mm_three_basic.cc', self.staging_dir_wd), [('small', (True, True)), ('medium', (True, True)), ('big', (True, True))]), - ] - - def tearDown(self): - util.rmtemp() - - def test__get_script_parser(self): - cpp_validate._script_parser = None - self.assertIsNotNone(cpp_validate._get_script_parser()) - self.assertIsNotNone(cpp_validate._get_script_parser()) - - def _test_parse_src(self, parsefunc, test_data): - def parse_file(filename): - path = os.path.join(self.cpp_validate_dir, filename) - with open(path, 'r') as f: - src = f.read() - return parsefunc(src) - for args, expected in test_data: - srcfile, = args - val = parse_file(srcfile) - #TODO: make some assertions - - def test__parse_testproc_script(self): - self._test_parse_src( - cpp_validate._parse_testproc_script, - self._parse_testproc_script_test_data) - - @unittest.skip("not yet supported") - def test__parse_testproc_python(self): - self._test_parse_src( - cpp_validate._parse_testproc_python, - self._parse_testproc_python_test_data) - - def test__parse_testproc_iter(self): - def testfunc(filename): - path = os.path.join(self.cpp_validate_dir, filename) - util.shell('cp', [path, '.'], wd=self.staging_dir_wd) - return list(cpp_validate._parse_testproc_iter(filename, wd=self.staging_dir_wd)) - for args, expected_list in self._parse_testproc_iter_test_data: - val_list = testfunc(*args) - for val, expected in zip(val_list, expected_list): - _, attr_val = val - attr_exp, = expected - self.assertEqual(attr_val, attr_exp) - #TODO: make some more assertions - - #def test__generate_data(self): - # def testfunc(filename, direction): - # path = os.path.join(self.cpp_validate_dir, filename) - # util.shell('cp', [path, '.'], wd=self.staging_dir_wd) - # for proc, attrs in cpp_validate._parse_testproc_iter(filename, wd=self.staging_dir_wd): - # defines = eval(attrs['define']) - # yield cpp_validate._generate_initial_data(proc, direction, filename, defines, wd=self.staging_dir_wd) - # - # for args, expected in self._generate_data_test_data: - # for filename in testfunc(*args): - # self.assertTrue(os.path.exists(filename)) - # #TODO: make some more assertions - - def test__compile_gpp(self): - def testfunc(src, obj): - src = os.path.join(self.cpp_validate_dir, src) - obj = os.path.join(self.staging_dir_wd, obj) - cpp_validate._compile_gpp(src, obj) - - for src, obj in self._compile_gpp_test_data: - testfunc(src, obj) - obj_path = os.path.join(self.staging_dir_wd, obj) - self.assertTrue(os.path.exists(obj_path)) - - def test__test_time(self): - def testfunc(control_time, test_time): - return cpp_validate._test_time(control_time, test_time) - - for args, exp in self._test_time_test_data: - val = testfunc(*args) - self.assertEqual(val, exp) - - def test__test_validate(self): - def testfunc(control_data, test_data): - if util.python_version_major == 3: - control_data = bytes(map(ord,control_data)) - test_data = bytes(map(ord,test_data)) - control_file, control_path = util.mktemp('wb') - control_file.write(control_data) - control_file.close() - test_file, test_path = util.mktemp('wb') - test_file.write(test_data) - test_file.close() - return cpp_validate._test_validate(control_path, test_path) - - for args, exp in self._test_validate_test_data: - val = testfunc(*args) - self.assertEqual(val, exp) - - def test__run_test_validate_time(self): - def makeobj(src, obj): - src_path = os.path.join(self.cpp_validate_dir, src) - obj_path = os.path.join(self.staging_dir_wd, obj) - util.shell('g++', ['-o', obj_path, src_path, '-lrt']) - util.set_tempfile(obj_path) - return src_path, obj_path - - def testfunc(control_src, control_obj, test_src, test_obj, in_data): - control_src, control_obj = makeobj(control_src, control_obj) - test_src, test_obj = makeobj(test_src, test_obj) - inpath = os.path.join(self.staging_dir_wd, 'test.in.data') - with open(inpath, 'wb') as infile: - infile.write(listtodata(in_data)) - util.set_tempfile(inpath) - return cpp_validate._run_test_validate_time(control_obj, test_obj, inpath) - - for args, expected in self._run_test_validate_time_test_data: - validate_val, time_val = testfunc(*args) - validate_exp, time_exp = expected - self.assertEqual(validate_val, validate_exp) - self.assertEqual(time_val, time_exp) - - def test__compile_run_test_validate_time(self): - def testfunc(control_src, test_src, in_data): - control_src = os.path.join(self.cpp_validate_dir, control_src) - test_src = os.path.join(self.cpp_validate_dir, test_src) - inpath = os.path.join(self.staging_dir_wd, 'test.in.data') - with open(inpath, 'wb') as infile: - infile.write(listtodata(in_data)) - util.set_tempfile(inpath) - return cpp_validate._compile_run_test_validate_time(control_src, test_src, inpath) - - for args, expected in self._compile_run_test_validate_time_test_data: - validate_val, time_val = testfunc(*args) - validate_exp, time_exp = expected - self.assertEqual(validate_val, validate_exp) - self.assertEqual(time_val, time_exp) - - def test__generate_initial_data(self): - def testfunc(testprocfile, srcfile, defines): - testprocpath = os.path.join(self.cpp_validate_dir, testprocfile) - with open(testprocpath, 'r') as f: - srcpath = os.path.join(self.cpp_validate_dir, srcfile) - testproc = cpp_validate._parse_testproc_script(f.read()) - return cpp_validate._generate_initial_data(testproc, srcpath, defines, wd=self.staging_dir_wd) - - for args, expected in self._generate_initial_data_test_data: - datafile = testfunc(*args) - with open(datafile, 'rb') as f: - self.assertEqual(len(f.read()), len(expected)) - - def test__format_insertion_dict(self): - def testfunc(testprocfile, srcfile, defines): - testprocpath = os.path.join(self.cpp_validate_dir, testprocfile) - srcpath = os.path.join(self.cpp_validate_dir, srcfile) - with open(testprocpath, 'r') as f: - testproc = cpp_validate._parse_testproc_script(f.read()) - #testproc.generatedata('in', defines) - #testproc.generatedata('out', defines) - return cpp_validate._format_insertion_dict(testproc, srcpath, defines) - - for args, exp in self._format_insertion_dict_test_data: - val = testfunc(*args) - for k,v in exp.items(): - self.assertEqual(val[k], v) - - def test__write_generated_code(self): - def testfunc(testprocfile, srcname, destname, defines): - srcpath = os.path.join(self.cpp_validate_dir, srcname) - with open(os.path.join(self.cpp_validate_dir, testprocfile),'r') as f: - testproc = cpp_validate._parse_testproc_script(f.read()) - return cpp_validate._write_generated_code(testproc, srcpath, defines, destname, self.staging_dir_wd) - for args, exp_path in self._write_generated_code_test_data: - val_path = testfunc(*args) - util.set_tempfile(val_path) - exp_path = os.path.join(self.cpp_validate_dir, exp_path) - with open(val_path, 'r') as valfile: - with open(exp_path, 'r') as expfile: - self.assertEqual(valfile.read().splitlines(), expfile.read().splitlines()) - - def test_run_from_src(self): - for args, expected in self.run_from_src_test_data: - control_src, test_src, wd = args - control_src = os.path.join(self.cpp_validate_dir, control_src) - test_src = os.path.join(self.cpp_validate_dir, test_src) - val = list(cpp_validate.run_from_src(control_src,test_src,wd)) - self.assertEqual(val, expected) - diff --git a/test-chill/unit-tests/test_gcov.py b/test-chill/unit-tests/test_gcov.py deleted file mode 100644 index 2720ef7..0000000 --- a/test-chill/unit-tests/test_gcov.py +++ /dev/null @@ -1,98 +0,0 @@ -import itertools -import pprint -import os -import textwrap -import unittest - -import testchill.util as util -import testchill.gcov as gcov - - -class TestGCov(unittest.TestCase): - def setUp(self): - self.cprog_dir = os.path.join(os.getcwd(), 'unit-tests/cprog') - self.cprog_bin = os.path.join(self.cprog_dir, 'bin/sorter') - - def build_prog(self): - self.clean_prog() - util.shell('make', [], wd=self.cprog_dir) - - def clean_prog(self): - util.shell('make', ['clean'], wd=self.cprog_dir) - - def run_prog(self, alg, lst): - util.shell(self.cprog_bin, [alg] + list(map(str,lst))) - - def test_GcovLine_mrege_lines(self): - ''' - 56: 14: while((index < pivot_index) && (list[index] >= pivot_value)) { - 6: 15: swap(list, index, pivot_index); - 6: 16: pivot_index--; - -: 17: } - And - 78: 14: while((index < pivot_index) && (list[index] >= pivot_value)) { - 18: 15: swap(list, index, pivot_index); - 18: 16: pivot_index--; - -: 17: } - ''' - lines_proc_one = list(itertools.starmap(gcov.GcovLine,[ - (14, {'proc_one': 56},' while((index < pivot_index) && (list[index] >= pivot_value)) {'), - (15, {'proc_one': 6},' swap(list, index, pivot_index);'), - (16, {'proc_one': 6},' pivot_index--;'), - (17, {'proc_one': None},' }')])) - lines_proc_two = list(itertools.starmap(gcov.GcovLine,[ - (14, {'proc_two': 78},' while((index < pivot_index) && (list[index] >= pivot_value)) {'), - (15, {'proc_two': 18},' swap(list, index, pivot_index);'), - (16, {'proc_two': 18},' pivot_index--;'), - (17, {'proc_two': None},' }')])) - gcov.GcovLine.merge_lines(lines_proc_one, lines_proc_two) - self.assertEqual(lines_proc_one[0].lineno, 14) - self.assertEqual(lines_proc_one[1].lineno, 15) - self.assertEqual(lines_proc_one[2].lineno, 16) - self.assertEqual(lines_proc_one[3].lineno, 17) - - def test_GcovLine_merge_and_count(self): - lines_proc_one = list(itertools.starmap(gcov.GcovLine,[ - (14, {'proc_one': 56},' while((index < pivot_index) && (list[index] >= pivot_value)) {'), - (15, {'proc_one': 6},' swap(list, index, pivot_index);'), - (16, {'proc_one': 6},' pivot_index--;'), - (17, {'proc_one': None},' }')])) - lines_proc_two = list(itertools.starmap(gcov.GcovLine,[ - (14, {'proc_two': 78},' while((index < pivot_index) && (list[index] >= pivot_value)) {'), - (15, {'proc_two': 18},' swap(list, index, pivot_index);'), - (16, {'proc_two': 18},' pivot_index--;'), - (17, {'proc_two': None},' }')])) - gcov.GcovLine.merge_lines(lines_proc_one, lines_proc_two) - self.assertEqual(lines_proc_one[0].count(), 134) - self.assertEqual(lines_proc_one[1].count(), 24) - self.assertEqual(lines_proc_one[2].count(), 24) - self.assertEqual(lines_proc_one[3].count(), None) - - def test_GcovFile_parse_lines(self): - lines = textwrap.dedent( - '''-:0:SomeProperty:SomeValue - 56: 14: while((index < pivot_index) && (list[index] >= pivot_value)) { - 6: 15: swap(list, index, pivot_index); - 6: 16: pivot_index--; - -: 17: }''').splitlines() - lines, properties = gcov.GcovFile.parse_lines(lines, 'proc') - self.assertEqual(lines[0].lineno, 14) - self.assertEqual(lines[0].count_by_process, {'proc': 56}) - self.assertEqual(lines[0].code, ' while((index < pivot_index) && (list[index] >= pivot_value)) {') - self.assertEqual(lines[3].count_by_process, dict()) - - def test_Gcov_parse(self): - self.build_prog() - self.run_prog('quicksort', [9, 4, 10, 6, 11, 0, 3, 7, 2, 1, 8, 5]) - cov = gcov.Gcov.parse(self.cprog_dir, 'unsorted') - self.build_prog() - self.run_prog('quicksort', [5, 4, 3, 2, 1]) - #pprint.pprint(vars(cov.files['QuickSorter.cc'])) - cov.merge(gcov.Gcov.parse(self.cprog_dir, 'reverse')) - #pprint.pprint(vars(cov.files['QuickSorter.cc'])) - #TODO: assert something - #cov.pretty_print() - - def tearDown(self): - self.clean_prog() - diff --git a/test-chill/unit-tests/test_omega.py b/test-chill/unit-tests/test_omega.py deleted file mode 100644 index 91d6a13..0000000 --- a/test-chill/unit-tests/test_omega.py +++ /dev/null @@ -1,23 +0,0 @@ -import os -import unittest - -import testchill.omega -import testchill.util - - -class TestOmegaTestCases(unittest.TestCase): - def setUp(self): - self.omega_dev_dir = os.getenv('OMEGA_DEV_SRC') - self.omega_rel_dir = os.getenv('OMEGA_RELEASE_SRC') - - def tearDown(self): - pass - - def test_omega_dev(self): - tc = testchill.omega.BuildOmegaTestCase(self.omega_dev_dir) - tc.run() - - def test_omega_release(self): - tc = testchill.omega.BuildOmegaTestCase(self.omega_rel_dir, 'release') - tc.run() - diff --git a/test-chill/unit-tests/test_test.py b/test-chill/unit-tests/test_test.py deleted file mode 100644 index 9745358..0000000 --- a/test-chill/unit-tests/test_test.py +++ /dev/null @@ -1,380 +0,0 @@ -import io -import pickle -import pprint -import unittest -import textwrap - -import testchill.test as test -import testchill.util as util - - -class Named(object): - def __init__(self, name): - self.name = name - - def setresult(self, res): - pass - -def make_tc(rfunc=None, sufunc=None, tdfunc=None, name=None): - class SomeTestCase(test.TestCase): - def setUp(self): - if sufunc: - sufunc(self) - - def run(self): - if rfunc != None: - return rfunc(self) - - def tearDown(self): - if tdfunc: - tdfunc(self) - - return SomeTestCase(name) - -def make_seqtc(subtests, sufunc=None, tdfunc=None, name=None): - class SomeSeqTestCase(test.SequencialTestCase): - def __init__(self, name): - test.SequencialTestCase.__init__(self, name) - for fn_name, func in subtests: - self.add_subtest(fn_name, func) - - def setUp(self): - if sufunc: - sufunc(self) - - def tearDown(self): - if tdfunc: - tdfunc(self) - - return SomeSeqTestCase(name) - - -class TestTest(unittest.TestCase): - - def flip_n_switch(self, n, value=True): - ''' - Return a function that sets switches[n] to value (True by default) - ''' - def flipswitch(tc): - self.switches[n] = value - return flipswitch - - def flip_n_switch_if_m(self, n, m, value=True): - ''' - Returns a function that sets switches[n] to value (True by default) if switches[m] is True - ''' - def flipswitch(tc): - if self.switches[m]: - self.switches[n] = value - return flipswitch - - def allways_raise(self, exc=Exception('Expected exception')): - ''' - Returns a function that raises an exception - ''' - def throwexc(tc): - raise exc - return throwexc - - def allways_fail(self): - ''' - Returns a function that returns an explicit failure - ''' - def fail(tc): - return test.TestResult.make_fail(test.TestResult, tc) - return fail - - def allways_skip(self): - ''' - Returns a function that skips - ''' - def skip(tc): - return test.TestResult.make_skipped(test.TestResult, tc) - return skip - - def allways_pass(self): - ''' - Returns a function that passes - ''' - def notfail(tc): - return test.TestResult.make_pass(test.TestResult, tc) - return notfail - - def donothing(self): - ''' - Returns a function that does nothing - ''' - def foo(tc): - pass - return foo - - def setUp(self): - self.switches = dict((n, False) for n in range(3)) - - def test_TestResult_make_pass(self): - self.assertTrue(test.TestResult.make_pass(test.TestResult, Named('i-pass')).passed()) - self.assertFalse(test.TestResult.make_pass(test.TestResult, Named('i-pass')).errored()) - self.assertFalse(test.TestResult.make_pass(test.TestResult, Named('i-pass')).failed()) - self.assertFalse(test.TestResult.make_pass(test.TestResult, Named('i-pass')).skipped()) - - def test_TestResult_make_error(self): - self.assertFalse(test.TestResult.make_error(test.TestResult, Named('i-error')).passed()) - self.assertTrue(test.TestResult.make_error(test.TestResult, Named('i-error')).errored()) - self.assertFalse(test.TestResult.make_error(test.TestResult, Named('i-error')).failed()) - self.assertFalse(test.TestResult.make_error(test.TestResult, Named('i-error')).skipped()) - - def test_TestResult_make_fail(self): - self.assertFalse(test.TestResult.make_fail(test.TestResult, Named('i-fail')).passed()) - self.assertFalse(test.TestResult.make_fail(test.TestResult, Named('i-fail')).errored()) - self.assertTrue(test.TestResult.make_fail(test.TestResult, Named('i-fail')).failed()) - self.assertFalse(test.TestResult.make_fail(test.TestResult, Named('i-fail')).skipped()) - - def test_TestResult_make_skipped(self): - self.assertFalse(test.TestResult.make_skipped(test.TestResult, Named('i-skip')).passed()) - self.assertFalse(test.TestResult.make_skipped(test.TestResult, Named('i-skip')).errored()) - self.assertFalse(test.TestResult.make_skipped(test.TestResult, Named('i-skip')).failed()) - self.assertTrue(test.TestResult.make_skipped(test.TestResult, Named('i-skip')).skipped()) - - def test__result(self): - result_passed = test.TestResult.make_pass(test.TestResult, Named('i-pass')) - result_failed = test.TestResult.make_fail(test.TestResult, Named('i-fail')) - self.assertTrue(result_passed is test._result(result_passed, Named('i-pass'))) - self.assertTrue(test._result(result_failed, Named('i-fail')).failed()) - self.assertTrue(test._result(Exception(), Named('i-error')).errored()) - - def test_run_empty(self): - test.run([]) - - def test_run_run(self): - test.run([make_tc( - rfunc=self.flip_n_switch(0))]) - self.assertTrue(self.switches[0]) - - def test_run_setupfirst(self): - test.run([make_tc( - rfunc = self.flip_n_switch_if_m(0,1), - sufunc = self.flip_n_switch(1))]) - self.assertTrue(self.switches[0]) - - def test_run_teardownlast(self): - test.run([make_tc( - rfunc = self.flip_n_switch(1), - tdfunc = self.flip_n_switch_if_m(0,1))]) - self.assertTrue(self.switches[0]) - - def test_run_teardown_allways(self): - test.run([make_tc( - rfunc = self.allways_raise(), - tdfunc = self.flip_n_switch(0))]) - self.assertTrue(self.switches[0]) - - def test_run_pass_result(self): - result_set = test.run([make_tc( - rfunc = self.donothing(), - name='pass')]) - result = result_set[0] - self.assertTrue(result.passed()) - self.assertFalse(result.errored()) - self.assertFalse(result.failed()) - self.assertFalse(result.skipped()) - - def test_run_error_result(self): - result_set = test.run([make_tc( - rfunc = self.allways_raise(), - name='error')]) - result = result_set[0] - self.assertFalse(result.passed()) - self.assertTrue(result.errored()) - self.assertFalse(result.failed()) - self.assertFalse(result.skipped()) - - def test_run_fail_result(self): - result_set = test.run([make_tc( - rfunc = self.allways_fail(), - name='fail')]) - result = result_set[0] - self.assertFalse(result.passed()) - self.assertFalse(result.errored()) - self.assertTrue(result.failed()) - self.assertFalse(result.skipped()) - - def test_run_skipped_result(self): - result_set = test.run([make_tc( - rfunc = self.allways_skip(), - name='skipped')]) - result = result_set[0] - self.assertFalse(result.passed()) - self.assertFalse(result.errored()) - self.assertFalse(result.failed()) - self.assertTrue(result.skipped()) - - def test_run_seq_empty(self): - test.run([make_seqtc([])]) - - def test_run_seq_allrun(self): - result_set = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', self.flip_n_switch(1)), - ('three', self.flip_n_switch(2))], - name='seq')]) - self.assertTrue(result_set[0].passed()) - self.assertTrue(self.switches[0]) - self.assertTrue(self.switches[1]) - self.assertTrue(self.switches[2]) - - def test_run_seq_until_fail(self): - result_set = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', self.allways_fail()), - ('trhee', self.flip_n_switch(1))], - name='seq')]) - self.assertTrue(result_set[0].failed()) - self.assertTrue(self.switches[0]) - self.assertFalse(self.switches[1]) - - def test_run_seq_until_error(self): - result_set = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', self.allways_raise()), - ('trhee', self.flip_n_switch(1))], - name='seq')]) - self.assertTrue(result_set[0].errored()) - self.assertTrue(self.switches[0]) - self.assertFalse(self.switches[1]) - - def test_persistance_one_pass(self): - result_set = test.run([make_tc(self.allways_pass(), name='tc-name')]) - read_result_set = util.withtmp( - lambda f: pickle.dump(result_set, f), - lambda f: pickle.load(f)) - self.assertEqual(list(map(vars,result_set)), list(map(vars,read_result_set))) - - def test_persistance_seq(self): - result_set = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', self.flip_n_switch(1))], - name = 'seq')]) - read_result_set = util.withtmp( - lambda f: pickle.dump(result_set, f), - lambda f: pickle.load(f)) - - for i in range(len(result_set)): - self.assertEqual(result_set[i].status, read_result_set[i].status) - self.assertEqual(result_set[i].testcase_name, read_result_set[i].testcase_name) - for j in range(len(result_set[i].sub_results)): - self.assertEqual(result_set[i].sub_results[j].status, read_result_set[i].sub_results[j].status) - self.assertEqual(result_set[i].sub_results[j].testcase_name, read_result_set[i].sub_results[j].testcase_name) - - def test_persistance_seq_error(self): - result_set = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', self.allways_raise())], - name = 'seq')]) - read_result_set = util.withtmp( - lambda f: pickle.dump(result_set, f), - lambda f: pickle.load(f)) - - for i in range(len(result_set)): - self.assertEqual(result_set[i].status, read_result_set[i].status) - self.assertEqual(result_set[i].testcase_name, read_result_set[i].testcase_name) - for j in range(len(result_set[i].sub_results)): - self.assertEqual(result_set[i].sub_results[j].status, read_result_set[i].sub_results[j].status) - self.assertEqual(result_set[i].sub_results[j].testcase_name, read_result_set[i].sub_results[j].testcase_name) - - def test_FailedTestResult_init(self): - result = test.TestResult.make_fail(test.FailedTestResult, Named('i-fail'), reason='testing') - self.assertFalse(result.passed()) - self.assertTrue(result.failed()) - self.assertFalse(result.errored()) - self.assertFalse(result.skipped()) - self.assertEqual(result.testcase_name, 'i-fail') - self.assertEqual(result.reason, 'testing') - - def test_pretty_print(self): - def pretty_print_to_string(results_iter): - sio = util.StringIO() - test.pretty_print_results(results_iter, outfile=sio) - return sio.getvalue() - - results_iter = iter([ - test.TestResult.make_pass(test.TestResult, Named('i-pass')), - test.TestResult.make_error(test.UnhandledExceptionTestResult, Named('i-error'), Exception, Exception(), None), - test.TestResult.make_fail(test.FailedTestResult, Named('i-fail'), reason='Oops'), - test.TestResult.make_skipped(test.TestResult, Named('i-skip')) - ]) - - self.assertEqual(pretty_print_to_string(results_iter), textwrap.dedent('''\ - Passed: 1 - Errors: 1 - Failed: 1 - Skipped: 1 - ============================================================ - error: i-error - ------------------------------------------------------------ - <class 'Exception'>: - ------------------------------------------------------------ - ============================================================ - fail: i-fail - ------------------------------------------------------------ - Oops - ------------------------------------------------------------ - ''')) - result_set = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', self.flip_n_switch(1)), - ('three', self.flip_n_switch(2))], - name='seq')]) - result_set_fail = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', lambda s: test.TestResult.make_fail(test.FailedTestResult, s, 'Oops')), - ('trhee', self.flip_n_switch(1))], - name='seq')]) - result_set_error = test.run([make_seqtc([ - ('one', self.flip_n_switch(0)), - ('two', lambda s: test.TestResult.make_error(test.UnhandledExceptionTestResult, s, Exception, Exception(), None))], - name = 'seq')]) - - - - compound_set = pretty_print_to_string(result_set) - compound_set_fail = pretty_print_to_string(result_set_fail) - compound_set_error = pretty_print_to_string(result_set_error) - - self.assertEqual(compound_set, textwrap.dedent('''\ - Passed: 1 - Errors: 0 - Failed: 0 - Skipped: 0 - ''')) - self.assertEqual(compound_set_fail, textwrap.dedent('''\ - Passed: 0 - Errors: 0 - Failed: 1 - Skipped: 0 - ============================================================ - fail: seq - ------------------------------------------------------------ - pass: one - fail: two - Oops - ------------------------------------------------------------ - ''')) - self.assertEqual(compound_set_error, textwrap.dedent('''\ - Passed: 0 - Errors: 1 - Failed: 0 - Skipped: 0 - ============================================================ - error: seq - ------------------------------------------------------------ - pass: one - error: two - <class 'Exception'>: - ------------------------------------------------------------ - ''')) - - def tearDown(self): - util.rmtemp() - -if __name__ == '__main__': - unittest.main() diff --git a/test-chill/unit-tests/test_util.py b/test-chill/unit-tests/test_util.py deleted file mode 100644 index fbb0c79..0000000 --- a/test-chill/unit-tests/test_util.py +++ /dev/null @@ -1,107 +0,0 @@ -import os -import subprocess -import tempfile -import unittest - -import testchill.util as util - -### Most of these are sanity checks. ### - -class TestUtil(unittest.TestCase): - def setUp(self): - self.tempfiles = [] - - def maketempfiles(self, n=1): - files = tuple([tempfile.mkstemp(text=True) for i in range(n)]) - self.tempfiles += list(map(lambda f: f[1], files)) - return files - - def test_shell(self): - sbla = subprocess.check_output(['ls', '-la', 'test-cases/chill']) - - if util.python_version_major == 3: - sbla = sbla.decode() - - shla = util.shell('ls', ['-la', 'test-cases/chill']) - self.assertEqual(sbla, shla) - - def test_shell_env(self): - env = {'STRING_VAR':'string','NUMBER_VAR':3,'DEFINED_VAR':1} - - self.assertEqual(util.shell('echo', ['$STRING_VAR'], env=env), env['STRING_VAR'] + '\n') - self.assertEqual(util.shell('echo', ['$NUMBER_VAR'], env=env), str(env['NUMBER_VAR']) + '\n') - self.assertEqual(util.shell('echo', ['$DEFINED_VAR'], env=env), str(env['DEFINED_VAR']) + '\n') - - def test_shell_tofile(self): - tfile = self.maketempfiles(1) - fname = tfile[0][1] - - with open(fname, 'w') as f: - util.shell('ls', ['-la', 'test-cases/chill'], stdout=f) - with open(fname, 'r') as f: - self.assertEqual(util.shell('ls', ['-la', 'test-cases/chill']), f.read()) - - def test_copy(self): - class C(object): - pass - c = C() - c.x = 'x' - a = util.copy(c) - b = util.copy(c) - a.x = 'y' - self.assertEqual(c.x,'x') - self.assertEqual(b.x,'x') - self.assertEqual(a.x,'y') - - def test_callonce(self): - def foo(): - return 3 - foo_once = util.callonce(foo) - self.assertEqual(foo_once(), 3) - self.assertRaises(Exception, foo_once) - - def test_isdiff(self): - testdata = [ - (('aaa','aaa'),(False,' aaa')), - (('aab','aaa'),(True, '- aab\n+ aaa')), - (('a\nb','a\nb\nc'),(True, ' a\n b\n+ c')), - (('a\na\nc','a\nb\nc'),(True, ' a\n- a\n+ b\n c')) - ] - for args, expected in testdata: - isdiff_exp, diff_exp = expected - isdiff_val, diff_val = util.isdiff(*args) - self.assertEqual(isdiff_val, isdiff_exp) - self.assertEqual(diff_val, diff_exp) - - def test_filterext(self): - testdata = [ - ((['.c','.py'],['a.c','b.txt','c.py']),['a.c','c.py']) - ] - for args, expected in testdata: - self.assertEqual(list(util.filterext(*args)), expected) - - #TODO: - #def test_extract_tag(self): - # testdata = [ - # (('a', 'abc<a>def</a>ghi<b>jkl</b>mno<c>pqr</c>stu<b>zwx</b>yz'), ['def']), - # (('b', 'abc<a>def</a>ghi<b>jkl</b>mno<c>pqr</c>stu<b>zwx</b>yz'), ['jkl','zwx']), - # (('c', 'abc<a>def</a>ghi<b>jkl</b>mno<c>pqr</c>stu<b>zwx</b>yz'), ['pqr']), - # (('d', 'abc<a>def</a>ghi<b>jkl</b>mno<c>pqr</c>stu<b>zwx</b>yz'), []), - # ] - # for args, expected in testdata: - # self.assertEqual(list(util.extract_tag(*args)), expected) - - def test_textstream(self): - testdata = [ - (('asdf',),'asdf') - ] - for args, expected in testdata: - stream = util.textstream(*args) - self.assertTrue(hasattr(stream,'read')) - self.assertEqual(stream.read(), expected) - - def tearDown(self): - for f in self.tempfiles: - os.remove(f) - - diff --git a/test-chill/with/test_distribute.py.out b/test-chill/with/test_distribute.py.out new file mode 100644 index 0000000..f071e87 --- /dev/null +++ b/test-chill/with/test_distribute.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); +} diff --git a/test-chill/with/test_fuse.py.out b/test-chill/with/test_fuse.py.out new file mode 100644 index 0000000..062bd15 --- /dev/null +++ b/test-chill/with/test_fuse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_known.py.out b/test-chill/with/test_known.py.out new file mode 100644 index 0000000..062bd15 --- /dev/null +++ b/test-chill/with/test_known.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_known_2.py.out b/test-chill/with/test_known_2.py.out new file mode 100644 index 0000000..062bd15 --- /dev/null +++ b/test-chill/with/test_known_2.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_original.py.out b/test-chill/with/test_original.py.out new file mode 100644 index 0000000..3d84795 --- /dev/null +++ b/test-chill/with/test_original.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + C[t2][t4] += (A[t2][1] * B[1][t4]); + C[t2][t4] += (A[t2][2] * B[2][t4]); + C[t2][t4] += (A[t2][3] * B[3][t4]); + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_peel.py.out b/test-chill/with/test_peel.py.out new file mode 100644 index 0000000..3d84795 --- /dev/null +++ b/test-chill/with/test_peel.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + C[t2][t4] += (A[t2][1] * B[1][t4]); + C[t2][t4] += (A[t2][2] * B[2][t4]); + C[t2][t4] += (A[t2][3] * B[3][t4]); + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_permute.py.out b/test-chill/with/test_permute.py.out new file mode 100644 index 0000000..709b7ae --- /dev/null +++ b/test-chill/with/test_permute.py.out @@ -0,0 +1,22 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= ambn - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 <= 0) + for (t6 = 0; t6 <= an - 1; t6 += 1) { + C[t6][t4] = 0.0f; + C[t6][t4] += (A[t6][t2] * B[t2][t4]); + } + else + for (t6 = 0; t6 <= an - 1; t6 += 1) + C[t6][t4] += (A[t6][t2] * B[t2][t4]); +} diff --git a/test-chill/with/test_print_code.py.out b/test-chill/with/test_print_code.py.out new file mode 100644 index 0000000..f6e21a7 --- /dev/null +++ b/test-chill/with/test_print_code.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/with/test_print_dep.py.out b/test-chill/with/test_print_dep.py.out new file mode 100644 index 0000000..f6e21a7 --- /dev/null +++ b/test-chill/with/test_print_dep.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/with/test_print_space.py.out b/test-chill/with/test_print_space.py.out new file mode 100644 index 0000000..f6e21a7 --- /dev/null +++ b/test-chill/with/test_print_space.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/with/test_reverse.py.out b/test-chill/with/test_reverse.py.out new file mode 100644 index 0000000..1e9c9b6 --- /dev/null +++ b/test-chill/with/test_reverse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = -an + 1; t2 <= 0; t2 += 1) + for (t4 = -bm + 1; t4 <= 0; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[-t2][-t4] += (A[-t2][t6] * B[t6][-t4]); +} diff --git a/test-chill/with/test_scale.py.out b/test-chill/with/test_scale.py.out new file mode 100644 index 0000000..dff7515 --- /dev/null +++ b/test-chill/with/test_scale.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 4) + for (t4 = 0; t4 <= 4 * bm - 4; t4 += 4) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4 / 4] += (A[t2 / 4][t6] * B[t6][t4 / 4]); +} diff --git a/test-chill/with/test_shift.py.out b/test-chill/with/test_shift.py.out new file mode 100644 index 0000000..6eaa244 --- /dev/null +++ b/test-chill/with/test_shift.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (4 <= t2) + C[t2 - 4][t4] += (A[t2 - 4][0] * B[0][t4]); + if (4 <= t2) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += (A[t2 - 4][t6] * B[t6][t4]); + } + else if (4 <= t2) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += (A[t2 - 4][t6] * B[t6][t4]); +} diff --git a/test-chill/with/test_shift_to.py.out b/test-chill/with/test_shift_to.py.out new file mode 100644 index 0000000..01c7ff8 --- /dev/null +++ b/test-chill/with/test_shift_to.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 4; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2 - 4][t4] = 0.0f; + C[t2 - 4][t4] += (A[t2 - 4][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += (A[t2 - 4][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_skew.py.out b/test-chill/with/test_skew.py.out new file mode 100644 index 0000000..b3da044 --- /dev/null +++ b/test-chill/with/test_skew.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (t2 % 4 == 0) + C[t2 / 4][t4] += (A[t2 / 4][0] * B[0][t4]); + } + else if (t2 % 4 == 0) + C[t2 / 4][t4] += (A[t2 / 4][0] * B[0][t4]); + if (t2 % 4 == 0) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4] += (A[t2 / 4][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_tile.py.out b/test-chill/with/test_tile.py.out new file mode 100644 index 0000000..47bae06 --- /dev/null +++ b/test-chill/with/test_tile.py.out @@ -0,0 +1,26 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t8; + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= an) + for (t2 = 0; t2 <= bm - 1; t2 += 4) + for (t4 = 0; t4 <= an - 1; t4 += 1) + for (t6 = t2; t6 <= __rose_lt(bm - 1,t2 + 3); t6 += 1) { + if (1 <= ambn) { + C[t4][t6] = 0.0f; + C[t4][t6] += (A[t4][0] * B[0][t6]); + } + for (t8 = 1; t8 <= ambn - 1; t8 += 1) + C[t4][t6] += (A[t4][t8] * B[t8][t6]); + if (ambn <= 0) + C[t4][t6] = 0.0f; + } +} diff --git a/test-chill/with/test_unroll.py.out b/test-chill/with/test_unroll.py.out new file mode 100644 index 0000000..7770c60 --- /dev/null +++ b/test-chill/with/test_unroll.py.out @@ -0,0 +1,38 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + over1 = ambn % 4; + for (t6 = 0; t6 <= -over1 + ambn - 1; t6 += 4) { + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + C[t2][t4] += (A[t2][t6 + 1] * B[t6 + 1][t4]); + C[t2][t4] += (A[t2][t6 + 2] * B[t6 + 2][t4]); + C[t2][t4] += (A[t2][t6 + 3] * B[t6 + 3][t4]); + } + for (t6 = __rose_gt(0,ambn - over1); t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_unroll_extra.py.out b/test-chill/with/test_unroll_extra.py.out new file mode 100644 index 0000000..232d1c8 --- /dev/null +++ b/test-chill/with/test_unroll_extra.py.out @@ -0,0 +1,51 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) { + over1 = bm % 4; + for (t4 = 0; t4 <= -over1 + bm - 1; t4 += 4) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + C[t2][t4 + 1] = 0.0f; + C[t2][t4 + 1] += (A[t2][0] * B[0][t4 + 1]); + C[t2][t4 + 2] = 0.0f; + C[t2][t4 + 2] += (A[t2][0] * B[0][t4 + 2]); + C[t2][t4 + 3] = 0.0f; + C[t2][t4 + 3] += (A[t2][0] * B[0][t4 + 3]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) { + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + C[t2][t4 + 1] += (A[t2][t6] * B[t6][t4 + 1]); + C[t2][t4 + 2] += (A[t2][t6] * B[t6][t4 + 2]); + C[t2][t4 + 3] += (A[t2][t6] * B[t6][t4 + 3]); + } + } + for (t4 = __rose_gt(bm - over1,0); t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } + } +} diff --git a/test-chill/without/test_distribute.py.out b/test-chill/without/test_distribute.py.out new file mode 100644 index 0000000..e90e735 --- /dev/null +++ b/test-chill/without/test_distribute.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; +} diff --git a/test-chill/without/test_fuse.py.out b/test-chill/without/test_fuse.py.out new file mode 100644 index 0000000..e8f0856 --- /dev/null +++ b/test-chill/without/test_fuse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_known.py.out b/test-chill/without/test_known.py.out new file mode 100644 index 0000000..e8f0856 --- /dev/null +++ b/test-chill/without/test_known.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_known_2.py.out b/test-chill/without/test_known_2.py.out new file mode 100644 index 0000000..e8f0856 --- /dev/null +++ b/test-chill/without/test_known_2.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_original.py.out b/test-chill/without/test_original.py.out new file mode 100644 index 0000000..15cfc7b --- /dev/null +++ b/test-chill/without/test_original.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + C[t2][t4] += A[t2][1] * B[1][t4]; + C[t2][t4] += A[t2][2] * B[2][t4]; + C[t2][t4] += A[t2][3] * B[3][t4]; + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_peel.py.out b/test-chill/without/test_peel.py.out new file mode 100644 index 0000000..15cfc7b --- /dev/null +++ b/test-chill/without/test_peel.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + C[t2][t4] += A[t2][1] * B[1][t4]; + C[t2][t4] += A[t2][2] * B[2][t4]; + C[t2][t4] += A[t2][3] * B[3][t4]; + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_permute.py.out b/test-chill/without/test_permute.py.out new file mode 100644 index 0000000..5aeecfd --- /dev/null +++ b/test-chill/without/test_permute.py.out @@ -0,0 +1,22 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= ambn - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 <= 0) + for (t6 = 0; t6 <= an - 1; t6 += 1) { + C[t6][t4] = 0.0f; + C[t6][t4] += A[t6][t2] * B[t2][t4]; + } + else + for (t6 = 0; t6 <= an - 1; t6 += 1) + C[t6][t4] += A[t6][t2] * B[t2][t4]; +} diff --git a/test-chill/without/test_print_code.py.out b/test-chill/without/test_print_code.py.out new file mode 100644 index 0000000..f96eb53 --- /dev/null +++ b/test-chill/without/test_print_code.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/without/test_print_dep.py.out b/test-chill/without/test_print_dep.py.out new file mode 100644 index 0000000..f96eb53 --- /dev/null +++ b/test-chill/without/test_print_dep.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/without/test_print_space.py.out b/test-chill/without/test_print_space.py.out new file mode 100644 index 0000000..f96eb53 --- /dev/null +++ b/test-chill/without/test_print_space.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/without/test_reverse.py.out b/test-chill/without/test_reverse.py.out new file mode 100644 index 0000000..617d115 --- /dev/null +++ b/test-chill/without/test_reverse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = -an + 1; t2 <= 0; t2 += 1) + for (t4 = -bm + 1; t4 <= 0; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[-t2][-t4] += A[-t2][t6] * B[t6][-t4]; +} diff --git a/test-chill/without/test_scale.py.out b/test-chill/without/test_scale.py.out new file mode 100644 index 0000000..0f7be2a --- /dev/null +++ b/test-chill/without/test_scale.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 4) + for (t4 = 0; t4 <= 4 * bm - 4; t4 += 4) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4 / 4] += A[t2 / 4][t6] * B[t6][t4 / 4]; +} diff --git a/test-chill/without/test_shift.py.out b/test-chill/without/test_shift.py.out new file mode 100644 index 0000000..a26758b --- /dev/null +++ b/test-chill/without/test_shift.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (4 <= t2) + C[t2 - 4][t4] += A[t2 - 4][0] * B[0][t4]; + if (4 <= t2) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += A[t2 - 4][t6] * B[t6][t4]; + } + else if (4 <= t2) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += A[t2 - 4][t6] * B[t6][t4]; +} diff --git a/test-chill/without/test_shift_to.py.out b/test-chill/without/test_shift_to.py.out new file mode 100644 index 0000000..b29724c --- /dev/null +++ b/test-chill/without/test_shift_to.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 4; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2 - 4][t4] = 0.0f; + C[t2 - 4][t4] += A[t2 - 4][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += A[t2 - 4][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_skew.py.out b/test-chill/without/test_skew.py.out new file mode 100644 index 0000000..04c4208 --- /dev/null +++ b/test-chill/without/test_skew.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (t2 % 4 == 0) + C[t2 / 4][t4] += A[t2 / 4][0] * B[0][t4]; + } + else if (t2 % 4 == 0) + C[t2 / 4][t4] += A[t2 / 4][0] * B[0][t4]; + if (t2 % 4 == 0) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4] += A[t2 / 4][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_tile.py.out b/test-chill/without/test_tile.py.out new file mode 100644 index 0000000..e59933e --- /dev/null +++ b/test-chill/without/test_tile.py.out @@ -0,0 +1,26 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t8; + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= an) + for (t2 = 0; t2 <= bm - 1; t2 += 4) + for (t4 = 0; t4 <= an - 1; t4 += 1) + for (t6 = t2; t6 <= __rose_lt(bm - 1,t2 + 3); t6 += 1) { + if (1 <= ambn) { + C[t4][t6] = 0.0f; + C[t4][t6] += A[t4][0] * B[0][t6]; + } + for (t8 = 1; t8 <= ambn - 1; t8 += 1) + C[t4][t6] += A[t4][t8] * B[t8][t6]; + if (ambn <= 0) + C[t4][t6] = 0.0f; + } +} diff --git a/test-chill/without/test_unroll.py.out b/test-chill/without/test_unroll.py.out new file mode 100644 index 0000000..91bfa4f --- /dev/null +++ b/test-chill/without/test_unroll.py.out @@ -0,0 +1,38 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + over1 = ambn % 4; + for (t6 = 0; t6 <= -over1 + ambn - 1; t6 += 4) { + C[t2][t4] += A[t2][t6] * B[t6][t4]; + C[t2][t4] += A[t2][t6 + 1] * B[t6 + 1][t4]; + C[t2][t4] += A[t2][t6 + 2] * B[t6 + 2][t4]; + C[t2][t4] += A[t2][t6 + 3] * B[t6 + 3][t4]; + } + for (t6 = __rose_gt(0,ambn - over1); t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_unroll_extra.py.out b/test-chill/without/test_unroll_extra.py.out new file mode 100644 index 0000000..2126860 --- /dev/null +++ b/test-chill/without/test_unroll_extra.py.out @@ -0,0 +1,51 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) { + over1 = bm % 4; + for (t4 = 0; t4 <= -over1 + bm - 1; t4 += 4) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + C[t2][t4 + 1] = 0.0f; + C[t2][t4 + 1] += A[t2][0] * B[0][t4 + 1]; + C[t2][t4 + 2] = 0.0f; + C[t2][t4 + 2] += A[t2][0] * B[0][t4 + 2]; + C[t2][t4 + 3] = 0.0f; + C[t2][t4 + 3] += A[t2][0] * B[0][t4 + 3]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) { + C[t2][t4] += A[t2][t6] * B[t6][t4]; + C[t2][t4 + 1] += A[t2][t6] * B[t6][t4 + 1]; + C[t2][t4 + 2] += A[t2][t6] * B[t6][t4 + 2]; + C[t2][t4 + 3] += A[t2][t6] * B[t6][t4 + 3]; + } + } + for (t4 = __rose_gt(bm - over1,0); t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } + } +} |