summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
author The Android Open Source Project <initial-contribution@android.com> 2015-10-06 09:59:00 -0700
committer The Android Open Source Project <initial-contribution@android.com> 2015-10-06 09:59:00 -0700
commit1e5d0cd1bec6c96add46a3b9ca907ec2c222203b (patch)
tree9ae736de943f779a9ceb0786e3f5fc9e8eccbcb7 /compiler/optimizing/inliner.cc
parent92c4fc2518b582b8c28c32d53ca5c1738b4eb37a (diff)
parent7e8dd4c3147145879b26591492c839530d650b81 (diff)
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 0b65c564f7..f3b5f08c7e 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -43,6 +43,11 @@ namespace art {
static constexpr size_t kMaximumNumberOfHInstructions = 12;
void HInliner::Run() {
+ const CompilerOptions& compiler_options = compiler_driver_->GetCompilerOptions();
+ if ((compiler_options.GetInlineDepthLimit() == 0)
+ || (compiler_options.GetInlineMaxCodeUnits() == 0)) {
+ return;
+ }
if (graph_->IsDebuggable()) {
// For simplicity, we currently never inline when the graph is debuggable. This avoids
// doing some logic in the runtime to discover if a method could have been inlined.