ART: Do not attempt to compile a method with too many registers
The mir_graph has a hard limit on how many ssa registers it can
handle, and will silently fail or fatal out in debug builds when
more SSA registers are necessary. This adds a check in the frontend
that tries to catch some of these cases, and makes the DCHECK a
CHECK to not silently fail.
Bug: 16018097
Change-Id: Iad82178945a8f8c34943cc7573fd73d2b4decade
diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h
index 1556a19..79b3edf 100644
--- a/compiler/dex/mir_graph.h
+++ b/compiler/dex/mir_graph.h
@@ -727,7 +727,7 @@
* would be filtered out with current settings. When orig_sreg field is removed
* from RegLocation, expand s_reg_low to handle all possible cases and remove DCHECK().
*/
- DCHECK_EQ(new_num, static_cast<int16_t>(new_num));
+ CHECK_EQ(new_num, static_cast<int16_t>(new_num));
num_ssa_regs_ = new_num;
}