Reduce compilation time.
This change will decrease run-time performance by 5%. But it can
decrease the compilation time by 20%.
Change-Id: I9981f896e56aa2119a2b33730a54a8f4420d3d83
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc
index f11fdaf..fbd2f05 100644
--- a/src/compiler_llvm/compilation_unit.cc
+++ b/src/compiler_llvm/compilation_unit.cc
@@ -381,7 +381,7 @@
llvm::OwningPtr<llvm::TargetMachine> target_machine(
target->createTargetMachine(target_triple, "", target_attr, target_options,
llvm::Reloc::Static, llvm::CodeModel::Small,
- llvm::CodeGenOpt::Aggressive));
+ llvm::CodeGenOpt::Less));
CHECK(target_machine.get() != NULL) << "Failed to create target machine";
@@ -436,6 +436,7 @@
//pm_builder.Inliner = llvm::createPartialInliningPass();
pm_builder.OptLevel = 3;
pm_builder.DisableSimplifyLibCalls = 1;
+ pm_builder.DisableUnitAtATime = 1;
pm_builder.populateModulePassManager(pm);
pm_builder.populateFunctionPassManager(fpm);