Mercurial > octave
comparison configure.ac @ 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 | 6829836f86c2 |
children | 00f871ed7aa2 |
comparison
equal
deleted
inserted
replaced
29948:c92a4ebaa777 | 29949:f254c302bb9c |
---|---|
1454 | 1454 |
1455 OCTAVE_CHECK_LIB(bz2, BZIP2, | 1455 OCTAVE_CHECK_LIB(bz2, BZIP2, |
1456 [BZIP2 library not found. Octave will not be able to compress or decompress bzip2 files.], | 1456 [BZIP2 library not found. Octave will not be able to compress or decompress bzip2 files.], |
1457 [bzlib.h], [BZ2_bzCompressInit]) | 1457 [bzlib.h], [BZ2_bzCompressInit]) |
1458 | 1458 |
1459 ### Check for the LLVM library (JIT compiler). | |
1460 | |
1461 ENABLE_JIT=no | |
1462 AC_ARG_ENABLE([jit], | |
1463 [AS_HELP_STRING([--enable-jit], | |
1464 [(EXPERIMENTAL) enable JIT compiler])], | |
1465 [if test "$enableval" = yes; then ENABLE_JIT=yes; fi], []) | |
1466 | |
1467 LLVM_CPPFLAGS= | |
1468 LLVM_LDFLAGS= | |
1469 LLVM_LIBS= | |
1470 | |
1471 if test $ENABLE_JIT = yes; then | |
1472 | |
1473 ## Find llvm-config program from environment variable or by searching | |
1474 AC_ARG_VAR([LLVM_CONFIG], [path to llvm-config utility]) | |
1475 AC_CHECK_PROG([LLVM_CONFIG], llvm-config, llvm-config, []) | |
1476 | |
1477 if test -z "$LLVM_CONFIG"; then | |
1478 warn_llvm="llvm-config utility not found. JIT compiler is disabled." | |
1479 else | |
1480 dnl Preset warning message in case compile fails | |
1481 warn_llvm="LLVM was not found or is to old. JIT compiler is disabled." | |
1482 | |
1483 save_CPPFLAGS="$CPPFLAGS" | |
1484 save_LDFLAGS="$LDFLAGS" | |
1485 | |
1486 dnl Use -isystem if available because we don't want to see warnings in LLVM | |
1487 LLVM_INCLUDE_FLAG=-I | |
1488 OCTAVE_CC_FLAG([-isystem .], [ | |
1489 LLVM_INCLUDE_FLAG=-isystem | |
1490 AC_MSG_NOTICE([using -isystem for LLVM headers])]) | |
1491 | |
1492 dnl Use -isystem so we don't get warnings from llvm headers | |
1493 LLVM_CPPFLAGS="$LLVM_INCLUDE_FLAG `$LLVM_CONFIG --includedir`" | |
1494 LLVM_LDFLAGS="-L`$LLVM_CONFIG --libdir`" | |
1495 | |
1496 LDFLAGS="$LDFLAGS $LLVM_LDFLAGS" | |
1497 LLVM_SO=LLVM-`$LLVM_CONFIG --version` | |
1498 AC_CHECK_LIB([$LLVM_SO], [LLVMBuildAdd], [LLVM_LIBS="-l$LLVM_SO"], | |
1499 [LLVM_LIBS="`$LLVM_CONFIG --libs` `$LLVM_CONFIG --system-libs`"]) | |
1500 | |
1501 dnl Define some extra flags that LLVM requires in order to include headers. | |
1502 dnl Ideally we should get these from llvm-config, but llvm-config isn't | |
1503 dnl very helpful. | |
1504 CPPFLAGS="-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS $LLVM_CPPFLAGS $CPPFLAGS" | |
1505 AC_LANG_PUSH(C++) | |
1506 AC_CHECK_HEADER([llvm/Support/TargetSelect.h], [warn_llvm=""]) | |
1507 | |
1508 have_function_h=no | |
1509 AC_CHECK_HEADERS([llvm/IR/Function.h llvm/Function.h], | |
1510 [have_function_h=yes; break]) | |
1511 if test $have_function_h = no; then | |
1512 warn_llvm="Missing LLVM file Function.h. JIT compiler is disabled." | |
1513 fi | |
1514 | |
1515 have_irbuilder_h=no | |
1516 AC_CHECK_HEADERS([llvm/Support/IRBuilder.h llvm/IR/IRBuilder.h \ | |
1517 llvm/IRBuilder.h], [have_irbuilder_h=yes; break]) | |
1518 if test $have_irbuilder_h = no; then | |
1519 warn_llvm="Missing LLVM file IRBuilder.h. JIT compiler is disabled." | |
1520 fi | |
1521 | |
1522 have_llvm_data_h=no | |
1523 AC_CHECK_HEADERS([llvm/Target/TargetData.h llvm/IR/DataLayout.h \ | |
1524 llvm/DataLayout.h], [have_llvm_data_h=yes; break]) | |
1525 if test $have_llvm_data_h = no; then | |
1526 warn_llvm="Missing LLVM file TargetData.h. JIT compiler is disabled." | |
1527 fi | |
1528 | |
1529 AC_CHECK_HEADERS([llvm/IR/Verifier.h]) | |
1530 AC_CHECK_HEADERS([llvm/Analysis/BasicAliasAnalysis.h]) | |
1531 AC_CHECK_HEADERS([llvm/Transforms/Scalar/GVN.h]) | |
1532 AC_CHECK_HEADERS([llvm/Bitcode/ReaderWriter.h]) | |
1533 | |
1534 OCTAVE_LLVM_FUNCTION_ADDATTRIBUTE_API | |
1535 OCTAVE_LLVM_FUNCTION_ADDFNATTR_API | |
1536 OCTAVE_LLVM_CALLINST_ADDATTRIBUTE_API | |
1537 OCTAVE_LLVM_RAW_FD_OSTREAM_API | |
1538 OCTAVE_LLVM_LEGACY_PASSMANAGER_API | |
1539 OCTAVE_LLVM_IRBUILDER_API | |
1540 OCTAVE_LLVM_HAS_CREATEALWAYSINLINERPASS | |
1541 OCTAVE_LLVM_IRBUILDER_CREATECONSTINBOUNDSGEP1_32_API | |
1542 | |
1543 AC_LANG_POP(C++) | |
1544 CPPFLAGS="$save_CPPFLAGS" | |
1545 LDFLAGS="$save_LDFLAGS" | |
1546 fi | |
1547 | |
1548 if test -z "$warn_llvm"; then | |
1549 AC_DEFINE(HAVE_LLVM, 1, [Define to 1 if LLVM is available.]) | |
1550 else | |
1551 ENABLE_JIT=no | |
1552 LLVM_CPPFLAGS= | |
1553 LLVM_LDFLAGS= | |
1554 LLVM_LIBS= | |
1555 OCTAVE_CONFIGURE_WARNING([warn_llvm]) | |
1556 fi | |
1557 dnl FIXME: Re-instate when JIT is enabled by default | |
1558 dnl else | |
1559 dnl ## JIT build disabled | |
1560 dnl warn_llvm="JIT compiler disabled, some performance loss for loops" | |
1561 dnl OCTAVE_CONFIGURE_WARNING([warn_llvm]) | |
1562 fi | |
1563 if test $ENABLE_JIT = yes; then | |
1564 AC_DEFINE(ENABLE_JIT, 1, [Define to 1 to enable JIT compiler.]) | |
1565 fi | |
1566 | |
1567 AC_SUBST(LLVM_CPPFLAGS) | |
1568 AC_SUBST(LLVM_LDFLAGS) | |
1569 AC_SUBST(LLVM_LIBS) | |
1570 AM_CONDITIONAL([AMCOND_HAVE_LLVM], [test -z "$warn_llvm"]) | |
1571 | |
1572 ### Check for HDF5 library. | 1459 ### Check for HDF5 library. |
1573 | 1460 |
1574 save_CPPFLAGS="$CPPFLAGS" | 1461 save_CPPFLAGS="$CPPFLAGS" |
1575 save_LIBS="$LIBS" | 1462 save_LIBS="$LIBS" |
1576 CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" | 1463 CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" |
2964 LIBOCTAVE_LINK_OPTS="$CURL_LDFLAGS $SPARSE_XLDFLAGS $ARPACK_LDFLAGS $QRUPDATE_LDFLAGS $FFTW_XLDFLAGS $PCRE_LDFLAGS" | 2851 LIBOCTAVE_LINK_OPTS="$CURL_LDFLAGS $SPARSE_XLDFLAGS $ARPACK_LDFLAGS $QRUPDATE_LDFLAGS $FFTW_XLDFLAGS $PCRE_LDFLAGS" |
2965 | 2852 |
2966 AC_SUBST(LIBOCTAVE_LINK_DEPS) | 2853 AC_SUBST(LIBOCTAVE_LINK_DEPS) |
2967 AC_SUBST(LIBOCTAVE_LINK_OPTS) | 2854 AC_SUBST(LIBOCTAVE_LINK_OPTS) |
2968 | 2855 |
2969 LIBOCTINTERP_LINK_DEPS="$FT2_LIBS $HDF5_LIBS $MAGICK_LIBS $Z_LIBS $SPARSE_XLIBS $FFTW_XLIBS $OPENGL_LIBS $FONTCONFIG_LIBS $FREETYPE_LIBS $X11_LIBS $CARBON_LIBS $GL2PS_LIBS $LLVM_LIBS $JAVA_LIBS $LAPACK_LIBS" | 2856 LIBOCTINTERP_LINK_DEPS="$FT2_LIBS $HDF5_LIBS $MAGICK_LIBS $Z_LIBS $SPARSE_XLIBS $FFTW_XLIBS $OPENGL_LIBS $FONTCONFIG_LIBS $FREETYPE_LIBS $X11_LIBS $CARBON_LIBS $GL2PS_LIBS $JAVA_LIBS $LAPACK_LIBS" |
2970 | 2857 |
2971 LIBOCTINTERP_LINK_OPTS="$FT2_LDFLAGS $HDF5_LDFLAGS $MAGICK_LDFLAGS $Z_LDFLAGS $SPARSE_XLDFLAGS $FFTW_XLDFLAGS $LLVM_LDFLAGS" | 2858 LIBOCTINTERP_LINK_OPTS="$FT2_LDFLAGS $HDF5_LDFLAGS $MAGICK_LDFLAGS $Z_LDFLAGS $SPARSE_XLDFLAGS $FFTW_XLDFLAGS" |
2972 | 2859 |
2973 OCTAVE_LINK_DEPS="" | 2860 OCTAVE_LINK_DEPS="" |
2974 OCTAVE_LINK_OPTS="" | 2861 OCTAVE_LINK_OPTS="" |
2975 | 2862 |
2976 OCT_LINK_DEPS="" | 2863 OCT_LINK_DEPS="" |
3238 Java libraries: $JAVA_LIBS | 3125 Java libraries: $JAVA_LIBS |
3239 KLU CPPFLAGS: $KLU_CPPFLAGS | 3126 KLU CPPFLAGS: $KLU_CPPFLAGS |
3240 KLU LDFLAGS: $KLU_LDFLAGS | 3127 KLU LDFLAGS: $KLU_LDFLAGS |
3241 KLU libraries: $KLU_LIBS | 3128 KLU libraries: $KLU_LIBS |
3242 LAPACK libraries: $LAPACK_LIBS | 3129 LAPACK libraries: $LAPACK_LIBS |
3243 LLVM CPPFLAGS: $LLVM_CPPFLAGS | |
3244 LLVM LDFLAGS: $LLVM_LDFLAGS | |
3245 LLVM libraries: $LLVM_LIBS | |
3246 Magick++ CPPFLAGS: $MAGICK_CPPFLAGS | 3130 Magick++ CPPFLAGS: $MAGICK_CPPFLAGS |
3247 Magick++ LDFLAGS: $MAGICK_LDFLAGS | 3131 Magick++ LDFLAGS: $MAGICK_LDFLAGS |
3248 Magick++ libraries: $MAGICK_LIBS | 3132 Magick++ libraries: $MAGICK_LIBS |
3249 OpenGL libraries: $OPENGL_LIBS | 3133 OpenGL libraries: $OPENGL_LIBS |
3250 PCRE CPPFLAGS: $PCRE_CPPFLAGS | 3134 PCRE CPPFLAGS: $PCRE_CPPFLAGS |
3300 | 3184 |
3301 Default pager: $DEFAULT_PAGER | 3185 Default pager: $DEFAULT_PAGER |
3302 gnuplot: $GNUPLOT_BINARY | 3186 gnuplot: $GNUPLOT_BINARY |
3303 | 3187 |
3304 Build Octave Qt GUI: $BUILD_QT_SUMMARY_MSG | 3188 Build Octave Qt GUI: $BUILD_QT_SUMMARY_MSG |
3305 JIT compiler for loops: $ENABLE_JIT | |
3306 Build Java interface: $build_java | 3189 Build Java interface: $build_java |
3307 Build static libraries: $STATIC_LIBS | 3190 Build static libraries: $STATIC_LIBS |
3308 Build shared libraries: $SHARED_LIBS | 3191 Build shared libraries: $SHARED_LIBS |
3309 Dynamic Linking API: $DL_API_MSG | 3192 Dynamic Linking API: $DL_API_MSG |
3310 Include support for GNU readline: $USE_READLINE | 3193 Include support for GNU readline: $USE_READLINE |