view test/module.mk @ 29949:f254c302bb9c

remove JIT compiler from Octave sources As stated in the NEWS file entry added with this changeset, no one has ever seriously taken on further development of the JIT compiler in Octave since it was first added as part of a Google Summer of Code project in 2012 and it still does nothing significant. It is out of date with the default interpreter that walks the parse tree. Even though we have fixed the configure script to disable it by default, people still ask questions about how to build it, but it doesn’t seem that they are doing that to work on it but because they think it will make Octave code run faster (it never did, except for some extremely simple bits of code as examples for demonstration purposes only). * NEWS: Note change. * configure.ac, acinclude.m4: Eliminate checks and macros related to the JIT compiler and LLVM. * basics.txi, install.txi, octave.texi, vectorize.txi: Remove mention of JIT compiler and LLVM. * jit-ir.cc, jit-ir.h, jit-typeinfo.cc, jit-typeinfo.h, jit-util.cc, jit-util.h, pt-jit.cc, pt-jit.h: Delete. * libinterp/parse-tree/module.mk: Update. * Array-jit.cc: Delete. * libinterp/template-inst/module.mk: Update. * test/jit.tst: Delete. * test/module.mk: Update. * interpreter.cc (interpreter::interpreter): Don't check options for debug_jit or jit_compiler. * toplev.cc (F__octave_config_info__): Remove JIT compiler and LLVM info from struct. * ov-base.h (octave_base_value::grab, octave_base_value::release): Delete. * ov-builtin.h, ov-builtin.cc (octave_builtin::to_jit, octave_builtin::stash_jit): Delete. (octave_builtin::m_jtype): Delete data member and all uses. * ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_function::m_jit_info): Delete data member and all uses. (octave_user_function::get_info, octave_user_function::stash_info): Delete. * options.h (DEBUG_JIT_OPTION, JIT_COMPILER_OPTION): Delete macro definitions and all uses. * octave.h, octave.cc (cmdline_options::cmdline_options): Don't handle DEBUG_JIT_OPTION, JIT_COMPILER_OPTION): Delete. (cmdline_options::debug_jit, cmdline_options::jit_compiler): Delete functions and all uses. (cmdline_options::m_debug_jit, cmdline_options::m_jit_compiler): Delete data members and all uses. (octave_getopt_options long_opts): Remove "debug-jit" and "jit-compiler" from the list. * pt-eval.cc (tree_evaluator::visit_simple_for_command, tree_evaluator::visit_complex_for_command, tree_evaluator::visit_while_command, tree_evaluator::execute_user_function): Eliminate JIT compiler code. * pt-loop.h, pt-loop.cc (tree_while_command::get_info, tree_while_command::stash_info, tree_simple_for_command::get_info, tree_simple_for_command::stash_info): Delete functions and all uses. (tree_while_command::m_compiled, tree_simple_for_command::m_compiled): Delete member variable and all uses. * usage.h (usage_string, octave_print_verbose_usage_and_exit): Remove [--debug-jit] and [--jit-compiler] from the message. * Array.h (Array<T>::Array): Remove constructor that was only intended to be used by the JIT compiler. (Array<T>::jit_ref_count, Array<T>::jit_slice_data, Array<T>::jit_dimensions, Array<T>::jit_array_rep): Delete. * Marray.h (MArray<T>::MArray): Remove constructor that was only intended to be used by the JIT compiler. * NDArray.h (NDArray::NDarray): Remove constructor that was only intended to be used by the JIT compiler. * dim-vector.h (dim_vector::to_jit): Delete. (dim_vector::dim_vector): Remove constructor that was only intended to be used by the JIT compiler. * codeql-analysis.yaml, make.yaml: Don't require llvm-dev. * subst-config-vals.in.sh, subst-cross-config-vals.in.sh: Don't substitute OCTAVE_CONF_LLVM_CPPFLAGS, OCTAVE_CONF_LLVM_LDFLAGS, or OCTAVE_CONF_LLVM_LIBS. * Doxyfile.in: Don't define HAVE_LLVM. * aspell-octave.en.pws: Eliminate jit, JIT, and LLVM from the list of spelling exceptions. * build-env.h, build-env.in.cc (LLVM_CPPFLAGS, LLVM_LDFLAGS, LLVM_LIBS): Delete variables and all uses. * libinterp/corefcn/module.mk (%canon_reldir%_libcorefcn_la_CPPFLAGS): Remove $(LLVM_CPPFLAGS) from the list. * libinterp/parse-tree/module.mk (%canon_reldir%_libparse_tree_la_CPPFLAGS): Remove $(LLVM_CPPFLAGS) from the list.
author John W. Eaton <jwe@octave.org>
date Tue, 10 Aug 2021 16:42:29 -0400
parents 0b01806bb663
children 761210f338c7
line wrap: on
line source

%canon_reldir%_EXTRA_DIST =

%canon_reldir%_CLEANFILES =
%canon_reldir%_DISTCLEANFILES =
%canon_reldir%_MAINTAINERCLEANFILES =

TEST_FILES += \
  %reldir%/fntests.m \
  %reldir%/args.tst \
  %reldir%/bug-31371.tst \
  %reldir%/bug-40117.tst \
  %reldir%/bug-45969.tst \
  %reldir%/bug-45972.tst \
  %reldir%/bug-46330.tst \
  %reldir%/bug-49904.tst \
  %reldir%/bug-53579.tst \
  %reldir%/bug-53599.tst \
  %reldir%/bug-54490.tst \
  %reldir%/bug-55308.tst \
  %reldir%/bug-55321.tst \
  %reldir%/bug-55322.tst \
  %reldir%/bug-59950.tst \
  %reldir%/colormaps.tst \
  %reldir%/command.tst \
  %reldir%/complex.tst \
  %reldir%/deprecate-props.tst \
  %reldir%/diag-perm.tst \
  %reldir%/error.tst \
  %reldir%/eval-catch.tst \
  %reldir%/eval-command.tst \
  %reldir%/for.tst \
  %reldir%/func.tst \
  %reldir%/global.tst \
  %reldir%/if.tst \
  %reldir%/index.tst \
  %reldir%/inline-fcn.tst \
  %reldir%/integer.tst \
  %reldir%/io.tst \
  %reldir%/leftdiv.tst \
  %reldir%/line-continue.tst \
  %reldir%/logical-index.tst \
  %reldir%/null-assign.tst \
  %reldir%/parser.tst \
  %reldir%/prefer.tst \
  %reldir%/range.tst \
  %reldir%/recursion.tst \
  %reldir%/return.tst \
  %reldir%/single-index.tst \
  %reldir%/slice.tst \
  %reldir%/sparse-assign.tst \
  %reldir%/struct.tst \
  %reldir%/switch.tst \
  %reldir%/system.tst \
  %reldir%/transpose.tst \
  %reldir%/try.tst \
  %reldir%/unwind.tst \
  %reldir%/while.tst

DIRSTAMP_FILES += %reldir%/$(octave_dirstamp)

include %reldir%/bug-35448/module.mk
include %reldir%/bug-35881/module.mk
include %reldir%/bug-36025/module.mk
include %reldir%/bug-38236/module.mk
include %reldir%/bug-38691/module.mk
include %reldir%/bug-41723/module.mk
include %reldir%/bug-44940/module.mk
include %reldir%/bug-45351/module.mk
include %reldir%/bug-46660/module.mk
include %reldir%/bug-47680/module.mk
include %reldir%/bug-49379/module.mk
include %reldir%/bug-50014/module.mk
include %reldir%/bug-50035/module.mk
include %reldir%/bug-50716/module.mk
include %reldir%/bug-50831/module.mk
include %reldir%/bug-51192/module.mk
include %reldir%/bug-51532/module.mk
include %reldir%/bug-51534/module.mk
include %reldir%/bug-51599/module.mk
include %reldir%/bug-52075/module.mk
include %reldir%/bug-52722/module.mk
include %reldir%/bug-52851/module.mk
include %reldir%/bug-53027/module.mk
include %reldir%/bug-53468/module.mk
include %reldir%/bug-53956/module.mk
include %reldir%/bug-54995/module.mk
include %reldir%/bug-55758/module.mk
include %reldir%/bug-56068/module.mk
include %reldir%/bug-58572/module.mk
include %reldir%/bug-58593/module.mk
include %reldir%/bug-59451/module.mk
include %reldir%/bug-59617/module.mk
include %reldir%/bug-59661/module.mk
include %reldir%/bug-59704/module.mk
include %reldir%/bug-59937/module.mk
include %reldir%/bug-60237/module.mk
include %reldir%/bug-60882/module.mk
include %reldir%/class-concat/module.mk
include %reldir%/classdef/module.mk
include %reldir%/classdef-multiple-inheritance/module.mk
include %reldir%/classes/module.mk
include %reldir%/colon-op/module.mk
include %reldir%/ctor-vs-method/module.mk
include %reldir%/fcn-handle/module.mk
include %reldir%/json/module.mk
include %reldir%/local-functions/module.mk
include %reldir%/mex/module.mk
include %reldir%/nest/module.mk
include %reldir%/private-functions/module.mk
include %reldir%/publish/module.mk
include %reldir%/pkg/module.mk

define run-octave-tests
  ( cd %reldir% && $(SHELL) ../run-octave $(RUN_OCTAVE_OPTIONS) $(1) --no-init-file --silent --no-history -p $(abs_top_builddir)/%reldir%/mex $(abs_top_srcdir)/%reldir%/fntests.m $(abs_top_srcdir)/%reldir% ) && \
  if $(AM_V_P); then \
    echo ""; \
    if [ -f %reldir%/fntests.log ]; then \
      echo "Contents of %reldir%/fntests.log:"; \
      echo ""; \
      $(AWK) -f $(srcdir)/%reldir%/show-failures.awk %reldir%/fntests.log; \
    else \
      echo "%reldir%/fntests.log is missing!"; \
    fi; \
  fi
endef

check-local: $(GENERATED_TEST_FILES) $(MEX_TEST_FUNCTIONS) | $(OCTAVE_INTERPRETER_TARGETS) %reldir%/$(octave_dirstamp)
	$(AM_V_at)$(call run-octave-tests)

COVERAGE_DIR = %reldir%/coverage
COVERAGE_INFO = $(COVERAGE_DIR)/$(PACKAGE).info

## FIXME: To get something useful out of 'make coverage', you should use gcc
## and configure with compiler flags set to '-g --coverage'.  Adding the
## --coverage option to either WARN_CXXFLAGS or XTRA_CXXFLAGS resulted in
## link errors, so some work still needed to get a '--enable-coverage-flags'
## option working.

coverage: all
	lcov --directory . --zerocounters
	$(MAKE) $(AM_MAKEFLAGS) check
	$(MKDIR_P) $(COVERAGE_DIR)
	lcov --directory . --capture --output-file $(COVERAGE_INFO)
	genhtml --output-directory $(COVERAGE_DIR) $(COVERAGE_INFO)
	@echo ""
	@echo "Code coverage report successfully built.  Open the file"
	@echo ""
	@echo "   $(abs_top_builddir)/$(COVERAGE_DIR)/index.html"
	@echo ""
	@echo "in a web browser to view the results."
	@echo ""
.PHONY: coverage

%reldir%/conv.tst: %reldir%/mk-conv-tst.sh | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)rm -f $@-t $@ && \
	$(SHELL) $(srcdir)/%reldir%/mk-conv-tst.sh > $@-t && \
	mv $@-t $@

%reldir%/sparse.tst: %reldir%/mk-sparse-tst.sh | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)rm -f $@-t $@ && \
	$(SHELL) $(srcdir)/%reldir%/mk-sparse-tst.sh > $@-t && \
	mv $@-t $@

GENERATED_BC_OVERLOADS_DIRS := \
  $(shell $(SHELL) $(srcdir)/%reldir%/mk-bc-overloads-tst.sh test --list-dirs)

GENERATED_BC_OVERLOADS_FILES := \
  $(shell $(SHELL) $(srcdir)/%reldir%/mk-bc-overloads-tst.sh test --list-files)

$(GENERATED_BC_OVERLOADS_FILES): %reldir%/mk-bc-overloads-tst-stamp

%reldir%/.bc-overload-tests-stamp: %reldir%/mk-bc-overloads-tst.sh %reldir%/bc-overloads-expected | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)rm -f $@ && \
	$(SHELL) $(srcdir)/%reldir%/mk-bc-overloads-tst.sh test $(srcdir)/%reldir%/bc-overloads-expected && \
	touch $@

GENERATED_TEST_FILES = \
  %reldir%/conv.tst \
  %reldir%/sparse.tst \
  %reldir%/.bc-overload-tests-stamp

fixedtestsdir := $(octtestsdir)/fixed

TEST_INST_FILES = \
  %reldir%/conv.tst \
  %reldir%/sparse.tst \
  $(GENERATED_BC_OVERLOADS_FILES) \
  $(filter-out %reldir%/fntests.m, $(TEST_FILES))

install-data-local: install-test-files

uninstall-local: uninstall-test-files

install-test-files:
	for f in $(TEST_INST_FILES); do \
	  if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
	  base=`echo $$f | $(SED) 's,^%reldir%/,,'`; \
	  $(MKDIR_P) $(DESTDIR)$(fixedtestsdir)/`echo $$base | $(SED) 's,/*[^/]*$$,,'`; \
	  $(INSTALL_DATA) $$d$$f $(DESTDIR)$(fixedtestsdir)/$$base; \
	done
.PHONY: install-test-files

uninstall-test-files:
	for f in $(TEST_INST_FILES); do \
	  base=`echo $$f | $(SED) 's,^%reldir%/,,'`; \
	  rm -f $(DESTDIR)$(fixedtestsdir)/$$base; \
	done
.PHONY: uninstall-test-files

BUILT_SOURCES += $(GENERATED_TEST_FILES)

%canon_reldir%_EXTRA_DIST += \
  %reldir%/bc-overloads-expected \
  %reldir%/mk-bc-overloads-tst.sh \
  %reldir%/mk-conv-tst.sh \
  %reldir%/mk-sparse-tst.sh \
  %reldir%/mk_bc_overloads_expected.m \
  %reldir%/show-failures.awk \
  $(TEST_FILES) \
  $(noinst_TEST_FILES) \
  $(MEX_TEST_SRC)

EXTRA_DIST += $(%canon_reldir%_EXTRA_DIST)

%canon_reldir%_CLEANFILES += \
  $(GENERATED_BC_OVERLOADS_FILES) \
  $(GENERATED_TEST_FILES)

%canon_reldir%_DISTCLEANFILES += \
  %reldir%/fntests.log

CLEANFILES += $(%canon_reldir%_CLEANFILES)
DISTCLEANFILES += $(%canon_reldir%_DISTCLEANFILES)
MAINTAINERCLEANFILES += $(%canon_reldir%_MAINTAINERCLEANFILES)

clean-local: test-clean

test-clean:
	rm -f $(%canon_reldir%_CLEANFILES)
	rm -rf $(GENERATED_BC_OVERLOADS_DIRS)
	rm -rf $(COVERAGE_DIR)
	rm -rf $(MEX_TEST_FUNCTIONS)

test-distclean: test-clean
	rm -f $(%canon_reldir%_DISTCLEANFILES)

test-maintainer-clean: test-distclean
	rm -f $(%canon_reldir%_MAINTAINERCLEANFILES)