[arch-commits] Commit in faust/trunk (PKGBUILD llvm7.patch)
David Runge
dvzrv at archlinux.org
Wed Sep 26 16:54:28 UTC 2018
Date: Wednesday, September 26, 2018 @ 16:54:28
Author: dvzrv
Revision: 385472
upgpkg: faust 2.5.23-4
Rebuilding against llvm 7, by applying patch (partially based on upstream fixes for current HEAD). Adding full RELRO to sound2faust and sound2file. Minor fixes.
Added:
faust/trunk/llvm7.patch
Modified:
faust/trunk/PKGBUILD
-------------+
PKGBUILD | 41 +-
llvm7.patch | 946 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 970 insertions(+), 17 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-09-26 16:53:23 UTC (rev 385471)
+++ PKGBUILD 2018-09-26 16:54:28 UTC (rev 385472)
@@ -5,7 +5,7 @@
pkgname=faust
pkgver=2.5.23
-pkgrel=3
+pkgrel=4
pkgdesc="A functional programming language for realtime audio signal processing."
arch=('x86_64')
url="https://faust.grame.fr/"
@@ -13,14 +13,15 @@
groups=('pro-audio')
depends=('llvm-libs' 'libsndfile' 'libmicrohttpd')
makedepends=('llvm' 'xxd')
-# FIXME: java-environment=8 can not be used with current tooling
optdepends=('clang: needed for sound2reader'
- 'jdk8-openjdk: needed for faust2android'
+ 'java-environment=8: needed for faust2android'
'python2: needed for faust2md and faust2atomsnippets'
'ruby: needed for faust2sc and scbuilder')
options=('staticlibs')
-source=("https://github.com/grame-cncm/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha512sums=('7ffa165b865cea09b923cb1687e5b48a48186644f9efcf8b532f948368c825f0ce829a8d6ef64d9a59c81bac0597dbd6b05bd1ac40198f5d4e6403eda1e57e69')
+source=("https://github.com/grame-cncm/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ 'llvm7.patch')
+sha512sums=('7ffa165b865cea09b923cb1687e5b48a48186644f9efcf8b532f948368c825f0ce829a8d6ef64d9a59c81bac0597dbd6b05bd1ac40198f5d4e6403eda1e57e69'
+ 'd73e74cceea0513bdf6bbeb24d3e77ca7d360da512d33d48960d665c21ea3cf6deb139af6fad697a41d991506e7d53c9d5944d54307de3d719e3c1474d4ad3c3')
prepare() {
cd "${pkgname}-${pkgver}"
@@ -27,6 +28,12 @@
# fix scripts requiring python2
sed -e '1s/python/&2/' \
-i "tools/${pkgname}2appls/${pkgname}2"{md,atomsnippets}
+ # fix for llvm7 (derived partially from upstream fix of HEAD):
+ # https://github.com/grame-cncm/faust/issues/220
+ patch -Np1 -i ../llvm7.patch
+ # RELRO for sound2faust and sound2file
+ sed -e "/\$(LIBS)/ s/$/ $LDFLAGS/g" \
+ -i tools/sound2faust/Makefile
}
build() {
@@ -49,32 +56,32 @@
cd syntax-highlighting
# atom
install -vDm 644 "atom/language-${pkgname}/package.json" \
- "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/package.json"
+ -t "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/"
install -vDm 644 "atom/language-${pkgname}/grammars/${pkgname}.cson" \
- "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/grammars/${pkgname}.cson"
+ -t "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/grammars/"
install -vDm 644 "atom/language-${pkgname}/settings/language-${pkgname}.cson" \
- "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/settings/language-${pkgname}.cson"
- install -t "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/snippets/" \
- -vDm644 "atom/language-${pkgname}/snippets/"*
+ -t "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/settings/"
+ install -vDm 644 "atom/language-${pkgname}/snippets/"* \
+ -t "${pkgdir}/usr/lib/atom/dot-atom/packages/language-${pkgname}/snippets/"
install -vDm 644 "atom/language-${pkgname}/process-palette.json.linux" \
"${pkgdir}/usr/share/doc/${pkgname}/process-palette.json"
# kate
install -vDm 644 "${pkgname}.xml" \
- "${pkgdir}/usr/share/apps/katepart/syntax/${pkgname}.xml"
+ -t "${pkgdir}/usr/share/apps/katepart/syntax/"
# gedit
install -vDm 644 "${pkgname}.lang" \
- "${pkgdir}/usr/share/gtksourceview-2.0/language-specs/${pkgname}.lang"
+ -t "${pkgdir}/usr/share/gtksourceview-2.0/language-specs/"
install -vDm 644 "${pkgname}.lang" \
- "${pkgdir}/usr/share/gtksourceview-3.0/language-specs/${pkgname}.lang"
+ -t "${pkgdir}/usr/share/gtksourceview-3.0/language-specs/"
# highlight
- install -vDm 644 dsp.lang "$pkgdir/usr/share/highlight/langDefs/dsp.lang"
+ install -vDm 644 dsp.lang -t "$pkgdir/usr/share/highlight/langDefs/"
# nano
- install -vDm 644 "${pkgname}.nanorc" "$pkgdir/usr/share/nano/${pkgname}.nanorc"
+ install -vDm 644 "${pkgname}.nanorc" -t "$pkgdir/usr/share/nano/"
# vim
install -vDm 644 "${pkgname}.vim" \
- "${pkgdir}/usr/share/vim/vimfiles/syntax/${pkgname}.vim"
+ -t "${pkgdir}/usr/share/vim/vimfiles/syntax/"
# emacs
install -vDm 644 "${pkgname}-mode.el" \
- "${pkgdir}/usr/share/emacs/site-lisp/${pkgname}-mode.el"
+ -t "${pkgdir}/usr/share/emacs/site-lisp/"
}
Added: llvm7.patch
===================================================================
--- llvm7.patch (rev 0)
+++ llvm7.patch 2018-09-26 16:54:28 UTC (rev 385472)
@@ -0,0 +1,946 @@
+diff -ruN faust-2.5.23/compiler/Makefile.unix faust-2.5.23-b/compiler/Makefile.unix
+--- faust-2.5.23/compiler/Makefile.unix 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/Makefile.unix 2018-09-20 23:42:17.101639018 +0200
+@@ -160,6 +160,11 @@
+ CLANGLIBS=$(CLANGLIBSLIST)
+ CXXFLAGS += -std=gnu++11
+
++else ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION), 7.0.0 7.0.0svn))
++ LLVM_VERSION = LLVM_70
++ CLANGLIBS=$(CLANGLIBSLIST)
++ CXXFLAGS += -std=gnu++11
++
+ else
+ $(error "Unknown LLVM version $(LLVM_VERSION)")
+
+diff -ruN faust-2.5.23/compiler/generator/llvm/llvm_code_container.cpp faust-2.5.23-b/compiler/generator/llvm/llvm_code_container.cpp
+--- faust-2.5.23/compiler/generator/llvm/llvm_code_container.cpp 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/generator/llvm/llvm_code_container.cpp 2018-09-23 18:03:49.035915270 +0200
+@@ -35,7 +35,7 @@
+ TODO: in -mem mode, classInit and classDestroy will have to be called once at factory init and destroy time
+ */
+
+-#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define ModulePTR std::unique_ptr<Module>
+ #define MovePTR(ptr) std::move(ptr)
+ #else
+@@ -67,15 +67,15 @@
+ #endif
+ fBuilder = new IRBuilder<>(getContext());
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60))
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70))
+ // Set "-fast-math"
+ FastMathFlags FMF;
+-#if defined(LLVM_60)
++#if (defined(LLVM_60) || defined(LLVM_70))
+ FMF.setFast(); // has replaced the below function
+ #else
+ FMF.setUnsafeAlgebra();
+ #endif
+-#if (defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60))
++#if (defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70))
+ fBuilder->setFastMathFlags(FMF);
+ #else
+ fBuilder->SetFastMathFlags(FMF);
+@@ -98,15 +98,15 @@
+ fContext = context;
+ fBuilder = new IRBuilder<>(getContext());
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60))
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70))
+ // Set "-fast-math"
+ FastMathFlags FMF;
+-#if defined(LLVM_60)
++#if (defined(LLVM_60) || defined(LLVM_70))
+ FMF.setFast(); // has replaced the below function
+ #else
+ FMF.setUnsafeAlgebra();
+ #endif
+-#if (defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60))
++#if (defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70))
+ fBuilder->setFastMathFlags(FMF);
+ #else
+ fBuilder->SetFastMathFlags(FMF);
+@@ -222,8 +222,8 @@
+ Function* llvm_compute = Function::Create(llvm_compute_type, GlobalValue::ExternalLinkage, "compute" + fKlassName, fModule);
+ llvm_compute->setCallingConv(CallingConv::C);
+
+-#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
+-#if !defined(LLVM_50) && !defined(LLVM_60)
++#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
++#if !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)
+ llvm_compute->setDoesNotAlias(3U);
+ llvm_compute->setDoesNotAlias(4U);
+ #endif
+@@ -294,7 +294,7 @@
+
+ BasicBlock* block = BasicBlock::Create(getContext(), "entry_block", sr_fun);
+ fBuilder->SetInsertPoint(block);
+-#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* zone_ptr = fBuilder->CreateStructGEP(0, dsp, field_index);
+ #else
+ Value* zone_ptr = fBuilder->CreateStructGEP(dsp, field_index);
+@@ -656,7 +656,7 @@
+
+ Value* idx2[3];
+ idx2[0] = load_meta_ptr;
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ idx2[1] = fBuilder->CreateConstGEP2_32(type_def1, llvm_label1, 0, 0);
+ idx2[2] = fBuilder->CreateConstGEP2_32(type_def2, llvm_label2, 0, 0);
+ #else
+@@ -1231,7 +1231,7 @@
+
+ Function* llvm_computethreadInternal = fModule->getFunction("computeThread");
+ faustassert(llvm_computethreadInternal);
+-#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* fun_args[] = { fBuilder->CreateBitCast(arg1, fStructDSP), arg2 };
+ CallInst* call_inst = fBuilder->CreateCall(llvm_computethreadInternal, fun_args);
+ #else
+diff -ruN faust-2.5.23/compiler/generator/llvm/llvm_code_container.hh faust-2.5.23-b/compiler/generator/llvm/llvm_code_container.hh
+--- faust-2.5.23/compiler/generator/llvm/llvm_code_container.hh 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/generator/llvm/llvm_code_container.hh 2018-09-21 00:10:08.190282639 +0200
+@@ -29,7 +29,7 @@
+ #include "wss_code_container.hh"
+ #include "llvm_dynamic_dsp_aux.hh"
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/Support/FileSystem.h>
+ #define sysfs_binary_flag sys::fs::F_None
+ #elif defined(LLVM_34)
+@@ -38,7 +38,7 @@
+ #define sysfs_binary_flag raw_fd_ostream::F_Binary
+ #endif
+
+-#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define STREAM_ERROR std::error_code
+ #else
+ #define STREAM_ERROR std::string
+@@ -118,7 +118,7 @@
+
+ LlvmValue genFloat(const string& number)
+ {
+- #if defined(LLVM_60)
++ #if defined(LLVM_60) || defined(LLVM_70)
+ return ConstantFP::get(getContext(), APFloat(APFloat::IEEEsingle(), number));
+ #elif defined(LLVM_40) || defined(LLVM_50)
+ return ConstantFP::get(getContext(), APFloat(APFloat::IEEEsingle(), number));
+diff -ruN faust-2.5.23/compiler/generator/llvm/llvm_dsp_aux.cpp faust-2.5.23-b/compiler/generator/llvm/llvm_dsp_aux.cpp
+--- faust-2.5.23/compiler/generator/llvm/llvm_dsp_aux.cpp 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/generator/llvm/llvm_dsp_aux.cpp 2018-09-25 22:59:57.342028461 +0200
+@@ -41,7 +41,7 @@
+ //#include <llvm/Transforms/IPO/PassManagerBuilder.h>
+ //#include <llvm/Support/Threading.h>
+
+-#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ //#include <llvm/IR/Module.h>
+ //#include <llvm/IR/LLVMContext.h>
+ //#include <llvm/IRReader/IRReader.h>
+@@ -61,7 +61,7 @@
+ #include <llvm/Support/IRReader.h>
+ #endif
+
+-#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ /*
+ #include <llvm/Analysis/TargetLibraryInfo.h>
+ #include <llvm/Analysis/TargetTransformInfo.h>
+@@ -77,7 +77,7 @@
+ #define FUNCTION_PASS_MANAGER FunctionPassManager
+ #endif
+
+-#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+
+ #include <llvm/Bitcode/BitcodeWriter.h>
+ #include <llvm/Bitcode/BitcodeReader.h>
+@@ -94,20 +94,20 @@
+ */
+ #if defined(LLVM_32)
+ #include <llvm/DataLayout.h>
+-#elif !defined(LLVM_33) && !defined(LLVM_34) && !defined(LLVM_35) && !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60)
++#elif !defined(LLVM_33) && !defined(LLVM_34) && !defined(LLVM_35) && !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)
+ #ifndef _WIN32
+ //#include <llvm/Target/TargetData.h>
+ #endif
+ #endif
+
+-#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/ExecutionEngine/MCJIT.h>
+ //#include <llvm/ExecutionEngine/ObjectCache.h>
+ #else
+ #include <llvm/ExecutionEngine/JIT.h>
+ #endif
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ /*
+ #include <llvm/IR/LegacyPassNameParser.h>
+ #include <llvm/Linker/Linker.h>
+@@ -130,11 +130,11 @@
+ #define GET_CPU_NAME llvm::sys::getHostCPUName()
+ #endif
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ //#include <llvm/ExecutionEngine/ObjectCache.h>
+ #endif
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define sysfs_binary_flag sys::fs::F_None
+ #elif defined(LLVM_34)
+ #define sysfs_binary_flag sys::fs::F_Binary
+@@ -142,7 +142,7 @@
+ #define sysfs_binary_flag raw_fd_ostream::F_Binary
+ #endif
+
+-#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define STREAM_ERROR std::error_code
+ #define MEMORY_BUFFER MemoryBufferRef
+ #define MEMORY_BUFFER_GET(buffer) (buffer.getBuffer())
+@@ -156,7 +156,7 @@
+ #define MEMORY_BUFFER_CREATE(stringref) (MemoryBuffer::getMemBuffer(stringref))
+ #endif
+
+-#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define ModulePTR std::unique_ptr<Module>
+ #define MovePTR(ptr) std::move(ptr)
+ #else
+@@ -177,7 +177,7 @@
+
+ void* llvm_dsp_factory_aux::loadOptimize(const string& function)
+ {
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ void* fun = (void*)fJIT->getFunctionAddress(function);
+ if (fun) {
+ return fun;
+@@ -196,7 +196,7 @@
+
+ bool llvm_dsp_factory_aux::crossCompile(const string& target)
+ {
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ delete fObjectCache;
+ fObjectCache = new FaustObjectCache();
+ setTarget(target);
+@@ -211,10 +211,10 @@
+ {
+ if (llvm_dsp_factory_aux::gInstance++ == 0) {
+ // Install a LLVM error handler
+- #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ LLVMInstallFatalErrorHandler(llvm_dsp_factory_aux::LLVMFatalErrorHandler);
+ #endif
+- #if (!defined(LLVM_35) && !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60)) // In LLVM 3.5 this is gone.
++ #if (!defined(LLVM_35) && !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)) // In LLVM 3.5 this is gone.
+ if (!llvm_start_multithreaded()) {
+ std::cerr << "llvm_start_multithreaded error...\n";
+ }
+@@ -225,16 +225,16 @@
+ void llvm_dsp_factory_aux::stopLLVMLibrary()
+ {
+ if (--llvm_dsp_factory_aux::gInstance == 0) {
+- #if (!defined(LLVM_35)) && (!defined(LLVM_36)) && (!defined(LLVM_37)) && (!defined(LLVM_38)) && (!defined(LLVM_39)) && (!defined(LLVM_40)) && (!defined(LLVM_50) && !defined(LLVM_60)) // In LLVM 3.5 this is gone.
++ #if (!defined(LLVM_35)) && (!defined(LLVM_36)) && (!defined(LLVM_37)) && (!defined(LLVM_38)) && (!defined(LLVM_39)) && (!defined(LLVM_40)) && (!defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)) // In LLVM 3.5 this is gone.
+ llvm_stop_multithreaded();
+ #endif
+- #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ LLVMResetFatalErrorHandler();
+ #endif
+ }
+ }
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ llvm_dsp_factory_aux::llvm_dsp_factory_aux(const string& sha_key, const string& machine_code, const string& target)
+ :dsp_factory_imp("MachineDSP", sha_key, "")
+ {
+@@ -271,14 +271,14 @@
+ fModule = module;
+ fContext = context;
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ fObjectCache = nullptr;
+ #endif
+ }
+
+ llvm_dsp_factory_aux::~llvm_dsp_factory_aux()
+ {
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ delete fObjectCache;
+ #endif
+ if (fJIT) {
+@@ -290,7 +290,7 @@
+ stopLLVMLibrary();
+ }
+
+-#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ void llvm_dsp_factory_aux::LLVMFatalErrorHandler(const char* reason)
+ {
+ throw faustexception(reason);
+@@ -344,7 +344,11 @@
+ string res;
+ raw_string_ostream out_str(res);
+ if (binary) {
++ #if defined(LLVM_70)
++ WriteBitcodeToFile(*fModule, out_str);
++ #else
+ WriteBitcodeToFile(fModule, out_str);
++ #endif
+ } else {
+ out_str << *fModule;
+ }
+@@ -532,7 +536,7 @@
+
+ string llvm_dsp_factory_aux::writeDSPFactoryToMachineAux(const string& target)
+ {
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ if (target == "" || target == getTarget()) {
+ return fObjectCache->getMachineCode();
+ } else {
+@@ -563,7 +567,7 @@
+ out.flush();
+ }
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+
+ static llvm_dsp_factory* readDSPFactoryFromMachineAux(MEMORY_BUFFER buffer, const string& target)
+ {
+@@ -606,7 +610,7 @@
+ {
+ TLock lock(llvm_dsp_factory_aux::gDSPFactoriesLock);
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ ErrorOr<OwningPtr<MemoryBuffer>> buffer = MemoryBuffer::getFileOrSTDIN(machine_code_path);
+ if (error_code ec = buffer.getError()) {
+ std::cerr << "readDSPFactoryFromMachineFile failed : " << ec.message() << std::endl;
+@@ -790,7 +794,7 @@
+ }
+ }
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ EXPORT llvm_dsp_factory* readCDSPFactoryFromMachine(const char* machine_code, const char* target)
+ {
+ return readDSPFactoryFromMachine(machine_code, target);
+diff -ruN faust-2.5.23/compiler/generator/llvm/llvm_dsp_aux.hh faust-2.5.23-b/compiler/generator/llvm/llvm_dsp_aux.hh
+--- faust-2.5.23/compiler/generator/llvm/llvm_dsp_aux.hh 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/generator/llvm/llvm_dsp_aux.hh 2018-09-20 23:42:17.164971704 +0200
+@@ -36,11 +36,11 @@
+ #include "dsp_factory.hh"
+ #include "TMutex.h"
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ #include <llvm/ExecutionEngine/ObjectCache.h>
+ #endif
+
+-#if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define LLVM_MAX_OPT_LEVEL 5
+ #else
+ #define LLVM_MAX_OPT_LEVEL 4
+@@ -133,7 +133,7 @@
+ };
+ #endif
+
+-#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+
+ /*
+ static std::string getFeaturesStr()
+@@ -199,7 +199,7 @@
+
+ llvm::ExecutionEngine* fJIT;
+
+- #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++ #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ FaustObjectCache* fObjectCache;
+ #endif
+
+@@ -233,7 +233,7 @@
+
+ bool crossCompile(const std::string& target);
+
+- #if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ static void LLVMFatalErrorHandler(const char* reason);
+ #endif
+
+@@ -251,7 +251,7 @@
+ const std::string& target,
+ int opt_level = 0);
+
+- #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++ #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ llvm_dsp_factory_aux(const std::string& sha_key, const std::string& machine_code, const std::string& target);
+ #endif
+
+diff -ruN faust-2.5.23/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp faust-2.5.23-b/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp
+--- faust-2.5.23/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp 2018-09-25 23:13:17.146825104 +0200
+@@ -43,7 +43,7 @@
+ #include <llvm/Transforms/IPO/PassManagerBuilder.h>
+ #include <llvm/Support/Threading.h>
+
+-#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/IR/Module.h>
+ #include <llvm/IR/LLVMContext.h>
+ #include <llvm/IRReader/IRReader.h>
+@@ -62,7 +62,7 @@
+ #include <llvm/Support/IRReader.h>
+ #endif
+
+-#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/Analysis/TargetLibraryInfo.h>
+ #include <llvm/Analysis/TargetTransformInfo.h>
+ #include <llvm/IR/PassManager.h>
+@@ -76,7 +76,7 @@
+ #define FUNCTION_PASS_MANAGER FunctionPassManager
+ #endif
+
+-#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/Bitcode/BitcodeWriter.h>
+ #include <llvm/Bitcode/BitcodeReader.h>
+ #include <llvm/Transforms/IPO/AlwaysInliner.h>
+@@ -90,20 +90,20 @@
+ */
+ #if defined(LLVM_32)
+ #include <llvm/DataLayout.h>
+-#elif !defined(LLVM_33) && !defined(LLVM_34) && !defined(LLVM_35) && !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60)
++#elif !defined(LLVM_33) && !defined(LLVM_34) && !defined(LLVM_35) && !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)
+ #ifndef _WIN32
+ #include <llvm/Target/TargetData.h>
+ #endif
+ #endif
+
+-#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/ExecutionEngine/MCJIT.h>
+ #include <llvm/ExecutionEngine/ObjectCache.h>
+ #else
+ #include <llvm/ExecutionEngine/JIT.h>
+ #endif
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/IR/LegacyPassNameParser.h>
+ #include <llvm/Linker/Linker.h>
+ #include <llvm/IR/IRPrintingPasses.h>
+@@ -123,11 +123,11 @@
+ #define GET_CPU_NAME llvm::sys::getHostCPUName()
+ #endif
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ #include "llvm/ExecutionEngine/ObjectCache.h"
+ #endif
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define sysfs_binary_flag sys::fs::F_None
+ #elif defined(LLVM_34)
+ #define sysfs_binary_flag sys::fs::F_Binary
+@@ -135,7 +135,7 @@
+ #define sysfs_binary_flag raw_fd_ostream::F_Binary
+ #endif
+
+-#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define STREAM_ERROR std::error_code
+ #define MEMORY_BUFFER MemoryBufferRef
+ #define MEMORY_BUFFER_GET(buffer) (buffer.getBuffer())
+@@ -149,7 +149,7 @@
+ #define MEMORY_BUFFER_CREATE(stringref) (MemoryBuffer::getMemBuffer(stringref))
+ #endif
+
+-#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define ModulePTR std::unique_ptr<Module>
+ #define MovePTR(ptr) std::move(ptr)
+ #else
+@@ -211,7 +211,7 @@
+ }
+ #endif
+
+-#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+
+ static Module* ParseBitcodeFile(MEMORY_BUFFER Buffer,
+ LLVMContext& Context,
+@@ -250,7 +250,11 @@
+ {
+ string res;
+ raw_string_ostream out(res);
++#if (LLVM_70)
++ WriteBitcodeToFile(*fModule, out);
++#else
+ WriteBitcodeToFile(fModule, out);
++#endif
+ out.flush();
+ return base64_encode(res);
+ }
+@@ -259,7 +263,11 @@
+ {
+ STREAM_ERROR err;
+ raw_fd_ostream out(bit_code_path.c_str(), err, sysfs_binary_flag);
++#if (LLVM_70)
++ WriteBitcodeToFile(*fModule, out);
++#else
+ WriteBitcodeToFile(fModule, out);
++#endif
+ }
+
+ // IR
+@@ -302,12 +310,12 @@
+ fModule = module;
+ fContext = context;
+
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ fObjectCache = nullptr;
+ #endif
+ }
+
+-#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ /// AddOptimizationPasses - This routine adds optimization passes
+ /// based on selected optimization level, OptLevel. This routine
+ /// duplicates llvm-gcc behaviour.
+@@ -336,7 +344,7 @@
+ }
+ Builder.Inliner = createFunctionInliningPass(Threshold);
+ } else {
+- #if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Builder.Inliner = createAlwaysInlinerLegacyPass();
+ #else
+ Builder.Inliner = createAlwaysInlinerPass();
+@@ -377,22 +385,22 @@
+ InitializeNativeTargetAsmParser();
+
+ // For ObjectCache to work...
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ LLVMLinkInMCJIT();
+ #endif
+
+ // Restoring from machine code
+-#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++#if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ if (fObjectCache) {
+
+ // JIT
+- #if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ EngineBuilder builder((unique_ptr<Module>(fModule)));
+ #else
+ EngineBuilder builder(fModule);
+ #endif
+ builder.setEngineKind(EngineKind::JIT);
+- #if !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60)
++ #if !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)
+ builder.setUseMCJIT(true);
+ #endif
+ TargetMachine* tm = builder.selectTarget();
+@@ -417,7 +425,7 @@
+ initializeVectorization(Registry);
+ initializeIPO(Registry);
+ initializeAnalysis(Registry);
+- #if !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60)
++ #if !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)
+ initializeIPA(Registry);
+ #endif
+ initializeTransformUtils(Registry);
+@@ -425,14 +433,14 @@
+ initializeInstrumentation(Registry);
+ initializeTarget(Registry);
+
+- #if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ EngineBuilder builder((unique_ptr<Module>(fModule)));
+ #else
+ EngineBuilder builder(fModule);
+ #endif
+ builder.setOptLevel(CodeGenOpt::Aggressive);
+ builder.setEngineKind(EngineKind::JIT);
+- #if !defined(LLVM_60)
++ #if !defined(LLVM_60) && !defined(LLVM_70)
+ builder.setCodeModel(CodeModel::JITDefault);
+ #endif
+
+@@ -442,7 +450,7 @@
+ // MCJIT does not work correctly (incorrect float numbers ?) when used with dynamic libLLVM
+ #if (defined(LLVM_34) || defined(LLVM_35)) && !defined(_MSC_VER)
+ builder.setUseMCJIT(true);
+- #elif !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60)
++ #elif !defined(LLVM_36) && !defined(LLVM_37) && !defined(LLVM_38) && !defined(LLVM_39) && !defined(LLVM_40) && !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)
+ builder.setUseMCJIT(false);
+ #endif
+
+@@ -473,8 +481,8 @@
+
+ // -fastmath is activated at IR level, and has to be setup at JIT level also
+
+- #if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
+- #if !defined(LLVM_50) && !defined(LLVM_60)
++ #if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
++ #if !defined(LLVM_50) && !defined(LLVM_60) && !defined(LLVM_70)
+ targetOptions.LessPreciseFPMADOption = true;
+ #endif
+ targetOptions.AllowFPOpFusion = FPOpFusion::Fast;
+@@ -484,7 +492,7 @@
+ targetOptions.GuaranteedTailCallOpt = true;
+ #endif
+
+- #if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ targetOptions.NoTrappingFPMath = true;
+ targetOptions.FPDenormalMode = FPDenormal::IEEE;
+ #endif
+@@ -512,7 +520,7 @@
+ PASS_MANAGER pm;
+ FUNCTION_PASS_MANAGER fpm(fModule);
+
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) // Code taken from opt.cpp
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70) // Code taken from opt.cpp
+ TargetLibraryInfoImpl TLII(Triple(fModule->getTargetTriple()));
+ pm.add(new TargetLibraryInfoWrapperPass(TLII));
+ #else
+@@ -521,7 +529,7 @@
+ pm.add(tli);
+ #endif
+
+- #if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ fModule->setDataLayout(fJIT->getDataLayout());
+ #elif defined(LLVM_37) // Code taken from opt.cpp
+ fModule->setDataLayout(*fJIT->getDataLayout());
+@@ -535,7 +543,7 @@
+ #endif
+
+ // Add internal analysis passes from the target machine (mandatory for vectorization to work)
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) // Code taken from opt.cpp
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70) // Code taken from opt.cpp
+ pm.add(createTargetTransformInfoWrapperPass(tm->getTargetIRAnalysis()));
+ #else
+ tm->addAnalysisPasses(pm);
+@@ -546,7 +554,7 @@
+ }
+
+ if ((debug_var != "") && (debug_var.find("FAUST_LLVM1") != string::npos)) {
+- #if defined(LLVM_60)
++ #if defined(LLVM_60) | defined(LLVM_70)
+ // TargetRegistry::printRegisteredTargetsForVersion(std::cout);
+ #else
+ TargetRegistry::printRegisteredTargetsForVersion();
+@@ -563,7 +571,7 @@
+ pm.add(createVerifierPass());
+
+ if ((debug_var != "") && (debug_var.find("FAUST_LLVM4") != string::npos)) {
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ // TODO
+ #else
+ tm->addPassesToEmitFile(pm, fouts(), TargetMachine::CGFT_AssemblyFile, true);
+@@ -578,7 +586,7 @@
+ }
+ }
+
+- #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)) && !defined(_MSC_VER)
++ #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)) && !defined(_MSC_VER)
+ fObjectCache = new FaustObjectCache();
+ fJIT->setObjectCache(fObjectCache);
+ }
+@@ -877,7 +885,7 @@
+ {
+ TLock lock(llvm_dsp_factory_aux::gDSPFactoriesLock);
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ ErrorOr<OwningPtr<MemoryBuffer>> buffer = MemoryBuffer::getFileOrSTDIN(bit_code_path);
+ if (error_code ec = buffer.getError()) {
+ std::cerr << "readDSPFactoryFromBitcodeFile failed : " << ec.message() << std::endl;
+@@ -920,7 +928,7 @@
+ setlocale(LC_ALL, "C");
+ LLVMContext* context = new LLVMContext();
+ SMDiagnostic err;
+- #if defined(LLVM_36) || defined(LLVM_37) ||defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_36) || defined(LLVM_37) ||defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Module* module = parseIR(buffer, err, *context).release(); // parseIR takes ownership of the given buffer, so don't delete it
+ #else
+ Module* module = ParseIR(buffer, err, *context); // ParseIR takes ownership of the given buffer, so don't delete it
+@@ -962,7 +970,7 @@
+ {
+ TLock lock(llvm_dsp_factory_aux::gDSPFactoriesLock);
+
+- #if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ ErrorOr<OwningPtr<MemoryBuffer>> buffer = MemoryBuffer::getFileOrSTDIN(ir_code_path);
+ if (error_code ec = buffer.getError()) {
+ std::cerr << "readDSPFactoryFromIRFile failed : " << ec.message() << std::endl;
+@@ -1009,7 +1017,7 @@
+ ModulePTR loadSingleModule(const string filename, LLVMContext* context)
+ {
+ SMDiagnostic err;
+-#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ ModulePTR module = parseIRFile(filename, err, *context);
+ #elif defined(LLVM_36) || defined(LLVM_37)
+ ModulePTR module = parseIRFile(filename, err, *context).release();
+@@ -1047,7 +1055,7 @@
+ {
+ bool res = false;
+
+-#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ if (Linker::linkModules(*dst, MovePTR(src))) {
+ snprintf(error_msg, 256, "cannot link module");
+
+diff -ruN faust-2.5.23/compiler/generator/llvm/llvm_instructions.hh faust-2.5.23-b/compiler/generator/llvm/llvm_instructions.hh
+--- faust-2.5.23/compiler/generator/llvm/llvm_instructions.hh 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/generator/llvm/llvm_instructions.hh 2018-09-20 23:42:17.171638303 +0200
+@@ -41,7 +41,7 @@
+ #include <llvm/Support/Host.h>
+ #include <llvm/Support/TargetSelect.h>
+
+-#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/IR/IRBuilder.h>
+ #include <llvm/IR/DataLayout.h>
+ #include <llvm/IR/DerivedTypes.h>
+@@ -57,25 +57,25 @@
+ #include <llvm/Module.h>
+ #endif
+
+-#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/IR/Verifier.h>
+ #else
+ #include <llvm/Analysis/Verifier.h>
+ #endif
+
+-#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/ExecutionEngine/MCJIT.h>
+ #else
+ #include <llvm/ExecutionEngine/JIT.h>
+ #endif
+
+-#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/IR/PassManager.h>
+ #else
+ #include <llvm/PassManager.h>
+ #endif
+
+-#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/Bitcode/BitcodeWriter.h>
+ #include <llvm/Bitcode/BitcodeReader.h>
+ #else
+@@ -90,7 +90,7 @@
+ #define LLVM_FREE "free"
+ #endif
+
+-#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #define GET_ITERATOR(it) &(*(it))
+ #else
+ #define GET_ITERATOR(it) it
+@@ -291,7 +291,7 @@
+ VECTOR_OF_TYPES fDSPFields;
+ int fDSPFieldsCounter;
+ string fPrefix;
+- #if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ DataLayout* fDataLayout;
+ #endif
+
+@@ -396,7 +396,7 @@
+ // llvm_create_dsp block
+ BasicBlock* entry_func_llvm_create_dsp = BasicBlock::Create(fModule->getContext(), "entry", func_llvm_create_dsp);
+
+- #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ llvm::CallInst* call_inst1 = CallInst::Create(func_malloc, genInt64(fModule, fDataLayout->getTypeSizeInBits(dsp_type)), "", entry_func_llvm_create_dsp);
+ #else
+ // Dynamically computed object size (see http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt)
+@@ -614,7 +614,7 @@
+ initTypes(module);
+ #if defined(LLVM_35) || defined(LLVM_36)
+ fDataLayout = new DataLayout(*module->getDataLayout());
+- #elif defined(LLVM_34) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #elif defined(LLVM_34) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ fDataLayout = new DataLayout(module->getDataLayout());
+ #endif
+ }
+@@ -623,7 +623,7 @@
+ {
+ // External object not covered by Garbageable, so delete it here
+ delete fBuilder;
+- #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ delete fDataLayout;
+ #endif
+ }
+@@ -1001,7 +1001,7 @@
+ GlobalVariable* llvm_key = addStringConstant(inst->fKey, type_def1);
+ GlobalVariable* llvm_value = addStringConstant(inst->fValue, type_def2);
+
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* const_string1 = fBuilder->CreateConstGEP2_32(type_def1, llvm_key, 0, 0);
+ Value* const_string2 = fBuilder->CreateConstGEP2_32(type_def2, llvm_value, 0, 0);
+ #else
+@@ -1015,7 +1015,7 @@
+ zone_ptr = Constant::getNullValue((itfloat() == Typed::kFloat) ? fTypeMap[Typed::kFloat_ptr] : fTypeMap[Typed::kDouble_ptr]);
+ } else {
+ int field_index = fDSPFieldsNames[inst->fZone];
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ zone_ptr = fBuilder->CreateStructGEP(0, dsp, field_index);
+ #else
+ zone_ptr = fBuilder->CreateStructGEP(dsp, field_index);
+@@ -1043,7 +1043,7 @@
+ string name = replaceSpacesWithUnderscore(inst->fName);
+ llvm::Type* type_def = 0;
+ GlobalVariable* llvm_name = addStringConstant(inst->fName, type_def);
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* const_string = fBuilder->CreateConstGEP2_32(type_def, llvm_name, 0, 0);
+ #else
+ Value* const_string = fBuilder->CreateConstGEP2_32(llvm_name, 0, 0);
+@@ -1065,7 +1065,7 @@
+ idx[1] = mth_index;
+ Value* mth_ptr = fBuilder->CreateInBoundsGEP(ui, MAKE_IXD(idx, idx+2));
+ LoadInst* mth = fBuilder->CreateLoad(mth_ptr);
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* fun_args[] = { fUIInterface_ptr, const_string };
+ CallInst* call_inst = fBuilder->CreateCall(mth, fun_args);
+ #else
+@@ -1102,7 +1102,7 @@
+ string name = replaceSpacesWithUnderscore(label);
+ llvm::Type* type_def = 0;
+ GlobalVariable* llvm_label = addStringConstant(label, type_def);
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* const_string = fBuilder->CreateConstGEP2_32(type_def, llvm_label, 0, 0);
+ #else
+ Value* const_string = fBuilder->CreateConstGEP2_32(llvm_label, 0, 0);
+@@ -1116,7 +1116,7 @@
+
+ // Generates access to zone
+ int field_index = fDSPFieldsNames[zone];
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* zone_ptr = fBuilder->CreateStructGEP(0, dsp, field_index);
+ Value* fun_args[] = { fUIInterface_ptr, const_string, zone_ptr };
+ CallInst* call_inst = fBuilder->CreateCall(mth, fun_args);
+@@ -1153,7 +1153,7 @@
+ string name = replaceSpacesWithUnderscore(label);
+ llvm::Type* type_def = 0;
+ GlobalVariable* llvm_label = addStringConstant(label, type_def);
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* const_string = fBuilder->CreateConstGEP2_32(type_def, llvm_label, 0, 0);
+ #else
+ Value* const_string = fBuilder->CreateConstGEP2_32(llvm_label, 0, 0);
+@@ -1166,7 +1166,7 @@
+
+ // Generates access to zone
+ int field_index = fDSPFieldsNames[zone];
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* zone_ptr = fBuilder->CreateStructGEP(0, dsp, field_index);
+ #else
+ Value* zone_ptr = fBuilder->CreateStructGEP(dsp, field_index);
+@@ -1213,7 +1213,7 @@
+ string name = replaceSpacesWithUnderscore(label);
+ llvm::Type* type_def = 0;
+ GlobalVariable* llvm_label = addStringConstant(label, type_def);
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* const_string = fBuilder->CreateConstGEP2_32(type_def, llvm_label, 0, 0);
+ #else
+ Value* const_string = fBuilder->CreateConstGEP2_32(llvm_label, 0, 0);
+@@ -1227,7 +1227,7 @@
+
+ // Generates access to zone
+ int field_index = fDSPFieldsNames[zone];
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* zone_ptr = fBuilder->CreateStructGEP(0, dsp, field_index);
+ #else
+ Value* zone_ptr = fBuilder->CreateStructGEP(dsp, field_index);
+@@ -1378,7 +1378,7 @@
+ inst->fName, fModule);
+ function->setCallingConv(CallingConv::C);
+
+- #if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ // In order for auto-vectorization to correctly work with vectorizable math functions
+ if (find(gMathLibTable.begin(), gMathLibTable.end(), inst->fName) != gMathLibTable.end()) {
+ function->setDoesNotAccessMemory();
+@@ -1499,7 +1499,7 @@
+ {
+ if (named_address->fAccess & Address::kStruct) {
+ int field_index = fDSPFieldsNames[named_address->fName];
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ return fBuilder->CreateStructGEP(0, getDSP(), field_index);
+ #else
+ return fBuilder->CreateStructGEP(getDSP(), field_index);
+@@ -1672,7 +1672,7 @@
+
+ if (named_address->fAccess & Address::kStruct) {
+ int field_index = fDSPFieldsNames[named_address->fName];
+- #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++ #if defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ Value* store_ptr = fBuilder->CreateStructGEP(0, getDSP(), field_index);
+ #else
+ Value* store_ptr = fBuilder->CreateStructGEP(getDSP(), field_index);
+@@ -2362,7 +2362,7 @@
+ // Inst result for comparison
+ return generateScalarSelect(opcode, comp_value, genInt32(fModule, 1, size), genInt32(fModule, 0, size), size);
+ } else {
+- #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) ||defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60))
++ #if (defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) ||defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70))
+ LlvmValue value = fBuilder->CreateBinOp((Instruction::BinaryOps)gBinOpTable[opcode]->fLLVMFloatInst, arg1, arg2);
+ Instruction* inst = cast<Instruction>(value);
+ inst->setMetadata(LLVMContext::MD_fpmath, fBuilder->getDefaultFPMathTag());
+diff -ruN faust-2.5.23/compiler/signals/binop.cpp faust-2.5.23-b/compiler/signals/binop.cpp
+--- faust-2.5.23/compiler/signals/binop.cpp 2018-03-06 10:39:29.000000000 +0100
++++ faust-2.5.23-b/compiler/signals/binop.cpp 2018-09-20 23:42:17.064972726 +0200
+@@ -32,7 +32,7 @@
+
+ #if LLVM_BUILD
+
+-#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60)
++#if defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35) || defined(LLVM_36) || defined(LLVM_37) || defined(LLVM_38) || defined(LLVM_39) || defined(LLVM_40) || defined(LLVM_50) || defined(LLVM_60) || defined(LLVM_70)
+ #include <llvm/IR/Instructions.h>
+ #else
+ #include <llvm/Instructions.h>
More information about the arch-commits
mailing list