view libinterp/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 853e4b7ae0d5
children 72adc88bc674
line wrap: on
line source

LIBINTERP_DEFUN_FILES =

%canon_reldir%_EXTRA_DIST =

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

## Search local directories before those specified by the user.
%canon_reldir%_liboctinterp_la_CPPFLAGS = \
  @OCTINTERP_DLL_DEFS@ \
  -Iliboctave -I$(srcdir)/liboctave \
  -I$(srcdir)/liboctave/array \
  -Iliboctave/numeric -I$(srcdir)/liboctave/numeric \
  -Iliboctave/operators -I$(srcdir)/liboctave/operators \
  -I$(srcdir)/liboctave/system \
  -I$(srcdir)/liboctave/util \
  -I$(srcdir)/%reldir%/octave-value \
  -Ilibinterp -I$(srcdir)/libinterp \
  -I$(srcdir)/%reldir%/operators \
  -I%reldir%/parse-tree -I$(srcdir)/%reldir%/parse-tree \
  -I%reldir%/corefcn -I$(srcdir)/%reldir%/corefcn \
  -I$(srcdir)/liboctave/wrappers \
  $(HDF5_CPPFLAGS) \
  $(MAGICK_CPPFLAGS)

octlib_LTLIBRARIES += %reldir%/liboctinterp.la

%canon_reldir%_pkgconfig_DATA = %reldir%/octinterp.pc

BUILT_SOURCES += \
  %reldir%/builtin-defun-decls.h \
  %reldir%/corefcn/default-defs.h \
  %reldir%/corefcn/graphics-props.cc \
  %reldir%/corefcn/graphics.h \
  %reldir%/corefcn/mxtypes.h \
  %reldir%/corefcn/oct-tex-parser.h \
  %reldir%/corefcn/oct-tex-symbols.cc \
  %reldir%/parse-tree/oct-gperf.h \
  %reldir%/parse-tree/oct-parse.h

ULT_PARSER_SRC := \
  %reldir%/corefcn/oct-tex-lexer.in.ll

GENERATED_PARSER_FILES := \
  %reldir%/corefcn/oct-tex-lexer.ll \
  %reldir%/corefcn/oct-tex-parser.h \
  %reldir%/parse-tree/oct-parse.h

## These generated files are included in the source distribution to
## avoid needing certain tools to build from a distribution tarball.

LIBINTERP_BUILT_DISTFILES = \
  $(GENERATED_PARSER_FILES) \
  $(OPT_HANDLERS) \
  %reldir%/corefcn/oct-tex-symbols.cc \
  %reldir%/parse-tree/oct-gperf.h

## Files that are created during build process and installed,
## BUT not distributed in tarball.
LIBINTERP_BUILT_NODISTFILES = \
  %reldir%/build-env-features.cc \
  %reldir%/build-env.cc \
  %reldir%/builtin-defun-decls.h \
  %reldir%/builtins.cc \
  %reldir%/corefcn/default-defs.h \
  %reldir%/corefcn/graphics-props.cc \
  %reldir%/corefcn/graphics.h \
  %reldir%/corefcn/mxtypes.h \
  %reldir%/corefcn/oct-errno.cc \
  %reldir%/liboctinterp-build-info.cc \
  %reldir%/operators/ops.cc

%canon_reldir%_EXTRA_DIST += \
  %reldir%/DOCSTRINGS \
  %reldir%/build-env.in.cc \
  %reldir%/liboctinterp-build-info.in.cc \
  %reldir%/mk-build-env-features.sh \
  %reldir%/mk-builtins.pl \
  %reldir%/mk-doc.pl \
  %reldir%/op-kw-docs \
  $(LIBINTERP_BUILT_DISTFILES)

octinclude_HEADERS += \
  %reldir%/build-env.h \
  %reldir%/liboctinterp-build-info.h \
  %reldir%/octave.h \
  $(COREFCN_INC) \
  $(LIBINTERP_OPERATORS_INC) \
  $(OCTAVE_VALUE_INC) \
  $(PARSE_TREE_INC) \
  $(PARSER_INC)

noinst_HEADERS += \
  %reldir%/options.h \
  %reldir%/usage.h \
  $(NOINSTALL_LIBINTERP_OPERATORS_INC)

nodist_octinclude_HEADERS += \
  %reldir%/builtin-defun-decls.h \
  %reldir%/corefcn/graphics-props.cc \
  %reldir%/corefcn/graphics.h \
  %reldir%/corefcn/mxtypes.h

DIST_SRC += \
  %reldir%/octave.cc \
  $(OCTAVE_VALUE_SRC) \
  $(PARSE_TREE_SRC) \
  $(COREFCN_SRC)

include %reldir%/parse-tree/module.mk
include %reldir%/octave-value/module.mk
include %reldir%/operators/module.mk
include %reldir%/template-inst/module.mk
include %reldir%/corefcn/module.mk
include %reldir%/dldfcn/module.mk

DLD_LIBOCTINTERP_LIBADD = $(OCT_LINK_DEPS)
LIBINTERP_DLDFCN_LIBADD =

%canon_reldir%_liboctinterp_la_SOURCES = \
  %reldir%/octave.cc \
  $(LIBINTERP_OPERATORS_SRC) \
  $(TEMPLATE_INST_SRC)

nodist_%canon_reldir%_liboctinterp_la_SOURCES = \
  %reldir%/build-env-features.cc \
  %reldir%/build-env.cc \
  %reldir%/builtin-defun-decls.h \
  %reldir%/builtins.cc \
  %reldir%/corefcn/default-defs.h \
  %reldir%/corefcn/graphics.h \
  %reldir%/corefcn/mxtypes.h \
  %reldir%/corefcn/oct-errno.cc \
  %reldir%/liboctinterp-build-info.cc \
  %reldir%/operators/ops.cc

%canon_reldir%_liboctinterp_la_LIBADD = \
  %reldir%/octave-value/liboctave-value.la \
  %reldir%/parse-tree/libparse-tree.la \
  %reldir%/corefcn/libcorefcn.la \
  $(LIBINTERP_DLDFCN_LIBADD) \
  liboctave/liboctave.la \
  $(LIBOCTINTERP_LINK_DEPS)

if AMCOND_BUILD_EXTERNAL_LIBXERBLA
  %canon_reldir%_liboctinterp_la_LIBADD += \
    liboctave/external/blas-xtra/libxerbla.la
endif

## Increment the following version numbers as needed and according
## to the rules in the etc/HACKING.md file:

%canon_reldir%_liboctinterp_current = 9
%canon_reldir%_liboctinterp_revision = 0
%canon_reldir%_liboctinterp_age = 0

%canon_reldir%_liboctinterp_version_info = $(%canon_reldir%_liboctinterp_current):$(%canon_reldir%_liboctinterp_revision):$(%canon_reldir%_liboctinterp_age)

%canon_reldir%_liboctinterp_la_LDFLAGS = \
  -version-info $(%canon_reldir%_liboctinterp_version_info) \
  $(NO_UNDEFINED_LDFLAG) \
  -bindir $(bindir) \
  $(LIBOCTINTERP_LINK_OPTS) \
  $(WARN_LDFLAGS)

ULT_DIST_SRC := \
  $(filter-out $(GENERATED_PARSER_FILES), $(DIST_SRC)) \
  $(ULT_PARSER_SRC)

LIBINTERP_FOUND_DEFUN_FILES := \
  $(shell $(SHELL) $(srcdir)/build-aux/find-defun-files.sh "$(srcdir)" $(ULT_DIST_SRC))

BUILT_IN_DEFUN_FILES := $(OPT_HANDLERS) $(LIBINTERP_FOUND_DEFUN_FILES)

LIBINTERP_DEFUN_FILES += \
  $(BUILT_IN_DEFUN_FILES)

## FIXME: The following two variables are deprecated and should be removed
##        in Octave version 3.12.
DLL_CDEFS = @OCTINTERP_DLL_DEFS@
DLL_CXXDEFS = @OCTINTERP_DLL_DEFS@

## Rules to build test files

LIBINTERP_TST_FILES_SRC := $(shell $(SHELL) $(srcdir)/build-aux/find-files-with-tests.sh "$(srcdir)" $(ULT_DIST_SRC) $(DLDFCN_SRC))

LIBINTERP_TST_FILES := $(addsuffix -tst,$(LIBINTERP_TST_FILES_SRC))

libinterptestsdir := $(octtestsdir)

nobase_libinterptests_DATA = $(LIBINTERP_TST_FILES)

## Cancel the suffix rule and use a pattern rule instead.
.yy.cc:

## The ylwrap script always updates the parser source file so we use a temporary file
## name and our own move-if-change rule for that file.  Additionally fix up the file
## name comments that bison writes into the source file.
%.cc %.h : %.yy
	$(AM_V_YACC)$(am__skipyacc) rm -f $*.cc-t $*.cc-tt && \
	$(SHELL) $(YLWRAP) $< y.tab.c $*.cc-t y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) && \
	$(SED) 's|"$*\.cc-t"|"$*.cc"|g' $*.cc-t > $*.cc-tt && \
	mv $*.cc-tt $*.cc-t && \
	$(call move_if_change_rule,$*.cc-t,$*.cc)

## Special rules:
## Mostly for sources which must be built before rest of compilation.

%reldir%/build-env.cc: %reldir%/build-env.in.cc build-aux/subst-config-vals.sh | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)$(call simple-filter-rule,build-aux/subst-config-vals.sh)

%reldir%/build-env-features.cc: config.h %reldir%/mk-build-env-features.sh | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)rm -f $@-t && \
	$(SHELL) $(srcdir)/%reldir%/mk-build-env-features.sh $< > $@-t && \
	mv $@-t $@

%reldir%/liboctinterp-build-info.cc: %reldir%/liboctinterp-build-info.in.cc HG-ID | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)$(build-info-commands)

mkbuiltins_dld_opt =

%reldir%/builtins.cc: $(LIBINTERP_DEFUN_FILES) %reldir%/mk-builtins.pl | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)rm -f $@-t && \
	$(PERL) $(srcdir)/%reldir%/mk-builtins.pl --source $(mkbuiltins_dld_opt) "$(srcdir)" -- $(LIBINTERP_DEFUN_FILES) > $@-t && \
	mv $@-t $@

%reldir%/builtin-defun-decls.h: $(LIBINTERP_DEFUN_FILES) %reldir%/mk-builtins.pl | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)rm -f $@-t && \
	$(PERL) $(srcdir)/%reldir%/mk-builtins.pl --header $(mkbuiltins_dld_opt) "$(srcdir)" -- $(LIBINTERP_DEFUN_FILES) > $@-t && \
	$(simple_move_if_change_rule)

DOCSTRING_FILES += %reldir%/DOCSTRINGS

%reldir%/DOCSTRINGS: $(LIBINTERP_DEFUN_FILES) %reldir%/op-kw-docs | %reldir%/$(octave_dirstamp)
	$(AM_V_GEN)rm -f %reldir%/DOCSTRINGS-t && \
	( $(PERL) $(srcdir)/%reldir%/mk-doc.pl "$(srcdir)" $(LIBINTERP_DEFUN_FILES); $(SED) -ne '/^\x1d/,$$p' $(srcdir)/%reldir%/op-kw-docs ) > %reldir%/DOCSTRINGS-t && \
	$(call move_if_change_rule,%reldir%/DOCSTRINGS-t,$@)

OCTAVE_INTERPRETER_TARGETS += \
  $(LIBINTERP_TST_FILES)

DIRSTAMP_FILES += %reldir%/$(octave_dirstamp)

install-data-hook: install-oct install-built-in-docstrings

uninstall-local: uninstall-oct uninstall-built-in-docstrings

install-built-in-docstrings: %reldir%/DOCSTRINGS
	$(MKDIR_P) $(DESTDIR)$(octetcdir)
	$(INSTALL_DATA) $< $(DESTDIR)$(octetcdir)/built-in-docstrings
.PHONY: install-built-in-docstrings

uninstall-built-in-docstrings:
	rm -f $(DESTDIR)$(octetcdir)/built-in-docstrings
.PHONY: uninstall-built-in-docstrings

pkgconfig_DATA += $(%canon_reldir%_pkgconfig_DATA)

EXTRA_DIST += $(%canon_reldir%_EXTRA_DIST)

%canon_reldir%_CLEANFILES += \
  $(LIBINTERP_BUILT_NODISTFILES) \
  $(LIBINTERP_TST_FILES) \
  %reldir%/corefcn/oct-tex-parser.output \
  %reldir%/parse-tree/oct-parse.output

%canon_reldir%_DISTCLEANFILES += \
  $(%canon_reldir%_pkgconfig_DATA)

%canon_reldir%_MAINTAINERCLEANFILES += \
  %reldir%/DOCSTRINGS \
  $(LIBINTERP_BUILT_DISTFILES)

BUILT_DISTFILES += $(LIBINTERP_BUILT_DISTFILES)
BUILT_NODISTFILES += $(LIBINTERP_BUILT_NODISTFILES)

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

libinterp-clean:
	rm -f $(%canon_reldir%_CLEANFILES)

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

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