diff --git a/VERSION.txt b/VERSION.txt index 0db057113..8163e1ce6 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.20260618.0 +0.20260619.0 diff --git a/src/misc/compiler.cpp b/src/misc/compiler.cpp index 16e7b941a..9f1b78c98 100644 --- a/src/misc/compiler.cpp +++ b/src/misc/compiler.cpp @@ -101,7 +101,9 @@ bool Compiler::Impl::compile(const std::string &pCode) static const std::vector COMPILATION_ARGUMENTS {{"clang", "-fsyntax-only", "-O3", "-fno-math-errno", + "-fno-trapping-math", "-fno-stack-protector", + "-funroll-loops", DUMMY_FILE_NAME}}; std::unique_ptr compilation(driver.BuildCompilation(COMPILATION_ARGUMENTS)); @@ -334,7 +336,9 @@ extern double atanh(double); auto targetMachine {std::unique_ptr(target->createTargetMachine(module->getTargetTriple(), "generic", "", llvm::TargetOptions(), - llvm::Reloc::Static))}; + llvm::Reloc::Static, + std::nullopt, + llvm::CodeGenOptLevel::Aggressive))}; if (targetMachine == nullptr) { addError("A target machine could not be created."); @@ -368,9 +372,13 @@ extern double atanh(double); return true; #else - // Create an ORC-based JIT and keep track of it. + // Create an ORC-based JIT with aggressive code generation and keep track of it. - auto lljit {llvm::orc::LLJITBuilder().create()}; + auto jitTargetMachineBuilder {llvm::orc::JITTargetMachineBuilder(llvm::Triple(llvm::sys::getProcessTriple()))}; + + jitTargetMachineBuilder.setCodeGenOptLevel(llvm::CodeGenOptLevel::Aggressive); + + auto lljit {llvm::orc::LLJITBuilder().setJITTargetMachineBuilder(std::move(jitTargetMachineBuilder)).create()}; # ifndef CODE_COVERAGE_ENABLED if (!lljit) {