diff --git a/lib/Interpreter/BackendPasses.cpp b/lib/Interpreter/BackendPasses.cpp index db37819a..dcf71dac 100644 --- a/lib/Interpreter/BackendPasses.cpp +++ b/lib/Interpreter/BackendPasses.cpp @@ -104,13 +104,18 @@ void BackendPasses::CreatePasses(llvm::Module& M, int OptLevel) Inlining = CodeGenOptions::NormalInlining; #endif - // Handle disabling of LLVM optimization, where we want to preserve the - // internal module before any optimization. - if (m_CGOpts.DisableLLVMPasses) { - OptLevel = 0; - // Always keep at least ForceInline - NoInlining is deadly for libc++. - // Inlining = CGOpts.NoInlining; - } +// Revert https://github.com/root-project/root/commit/548eca7 bringing back +// optimisation level to O0 given the very long time needed to JIT simple +// pieces of code. +// // Handle disabling of LLVM optimization, where we want to preserve the +// // internal module before any optimization. +// if (m_CGOpts.DisableLLVMPasses) { +// OptLevel = 0; +// // Always keep at least ForceInline - NoInlining is deadly for libc++. +// // Inlining = CGOpts.NoInlining; +// } + + OptLevel = 0; llvm::PassManagerBuilder PMBuilder; PMBuilder.OptLevel = OptLevel; diff --git a/lib/Interpreter/CIFactory.cpp b/lib/Interpreter/CIFactory.cpp index 052895b6..9df199e5 100644 --- a/lib/Interpreter/CIFactory.cpp +++ b/lib/Interpreter/CIFactory.cpp @@ -1132,14 +1132,17 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts, CGOpts.EmitCodeView = 1; CGOpts.CXXCtorDtorAliases = 1; #endif - // Reduce amount of emitted symbols by optimizing more. - CGOpts.OptimizationLevel = 2; - // Taken from a -O2 run of clang: - CGOpts.DiscardValueNames = 1; - CGOpts.OmitLeafFramePointer = 1; - CGOpts.UnrollLoops = 1; - CGOpts.VectorizeLoop = 1; - CGOpts.VectorizeSLP = 1; +// Revert https://github.com/root-project/root/commit/548eca7 bringing back +// optimisation level to O0 given the very long time needed to JIT simple +// pieces of code. +// // Reduce amount of emitted symbols by optimizing more. +// CGOpts.OptimizationLevel = 2; +// // Taken from a -O2 run of clang: +// CGOpts.DiscardValueNames = 1; +// CGOpts.OmitLeafFramePointer = 1; +// CGOpts.UnrollLoops = 1; +// CGOpts.VectorizeLoop = 1; +// CGOpts.VectorizeSLP = 1; // CGOpts.setDebugInfo(clang::CodeGenOptions::FullDebugInfo); // CGOpts.EmitDeclMetadata = 1; // For unloading, for later