summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/compilation_unit.cc
diff options
context:
space:
mode:
author Shih-wei Liao <sliao@google.com> 2012-05-08 01:04:03 -0700
committer Shih-wei Liao <sliao@google.com> 2012-05-08 01:04:03 -0700
commite0e4024b2e3f6fa6feb3ef42f0f072ffb004f8f7 (patch)
tree7db4374ad2630d5d9870248c441a60e80a658502 /src/compiler_llvm/compilation_unit.cc
parent9199e7237615d31d943941f2b27c6f7709d88c05 (diff)
Reduce memory usage by halving the materialization threshold.
Also, functions declared with __attribute__((always_inline)) MUST be inlined. Note that FunctionInlining uses a heuristic to inline direct function calls to small functions. Function size (computed by # of basic blocks * some factors) < Inlining-threshold will be inlined. But invoke* insn should be inlined by other means anyway. Change-Id: I3f06ead75c78dfc83985458809311b7fa78bc1d7
Diffstat (limited to 'src/compiler_llvm/compilation_unit.cc')
-rw-r--r--src/compiler_llvm/compilation_unit.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc
index e7f77e21ce..1c473921cf 100644
--- a/src/compiler_llvm/compilation_unit.cc
+++ b/src/compiler_llvm/compilation_unit.cc
@@ -347,8 +347,8 @@ bool CompilationUnit::MaterializeToFile(int output_fd,
// Add optimization pass
llvm::PassManagerBuilder pm_builder;
- pm_builder.Inliner = llvm::createFunctionInliningPass();
- //pm_builder.Inliner = llvm::createAlwaysInlinerPass();
+ //pm_builder.Inliner = llvm::createFunctionInliningPass();
+ pm_builder.Inliner = llvm::createAlwaysInlinerPass();
//pm_builder.Inliner = llvm::createPartialInliningPass();
pm_builder.OptLevel = 3;
pm_builder.DisableSimplifyLibCalls = 1;