summaryrefslogtreecommitdiffstats
path: root/compiler/dex/mir_analysis.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-11-07 17:05:19 -0800
committerIan Rogers <irogers@google.com>2014-11-07 17:05:19 -0800
commitaaf29b32d1aefd10980820a67b2f36f168e68ca8 (patch)
treea273adfe3b1af2780dc91fb8b202df5e0882fdff /compiler/dex/mir_analysis.cc
parentabe07109e4128ea2adc26c0cb4312539bbe2913d (diff)
downloadandroid_art-aaf29b32d1aefd10980820a67b2f36f168e68ca8.tar.gz
android_art-aaf29b32d1aefd10980820a67b2f36f168e68ca8.tar.bz2
android_art-aaf29b32d1aefd10980820a67b2f36f168e68ca8.zip
Tidy some uses of IsCompilationEnabled.
We should be checking IsCompilationEnabled in the compiler, we wouldn't be in the compiler were compilation disabled. Change-Id: Ib498fb6d610e4ed517494df01efa4b64a8c12528
Diffstat (limited to 'compiler/dex/mir_analysis.cc')
-rw-r--r--compiler/dex/mir_analysis.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/dex/mir_analysis.cc b/compiler/dex/mir_analysis.cc
index ee48796996..44f69ba674 100644
--- a/compiler/dex/mir_analysis.cc
+++ b/compiler/dex/mir_analysis.cc
@@ -1112,14 +1112,11 @@ bool MIRGraph::SkipCompilation(std::string* skip_message) {
return true;
}
- if (!compiler_options.IsCompilationEnabled()) {
- *skip_message = "Compilation disabled";
- return true;
- }
+ DCHECK(compiler_options.IsCompilationEnabled());
// Set up compilation cutoffs based on current filter mode.
- size_t small_cutoff = 0;
- size_t default_cutoff = 0;
+ size_t small_cutoff;
+ size_t default_cutoff;
switch (compiler_filter) {
case CompilerOptions::kBalanced:
small_cutoff = compiler_options.GetSmallMethodThreshold();
@@ -1136,6 +1133,7 @@ bool MIRGraph::SkipCompilation(std::string* skip_message) {
break;
default:
LOG(FATAL) << "Unexpected compiler_filter_: " << compiler_filter;
+ UNREACHABLE();
}
// If size < cutoff, assume we'll compile - but allow removal.