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
diff --git a/compiler/dex/mir_analysis.cc b/compiler/dex/mir_analysis.cc
index ee48796..44f69ba 100644
--- a/compiler/dex/mir_analysis.cc
+++ b/compiler/dex/mir_analysis.cc
@@ -1112,14 +1112,11 @@
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 @@
break;
default:
LOG(FATAL) << "Unexpected compiler_filter_: " << compiler_filter;
+ UNREACHABLE();
}
// If size < cutoff, assume we'll compile - but allow removal.