Dex compiler: re-enable method pattern matching
The dex compiler's mechanism to detect simple methods and emit
streamlined code was disabled during the last big restructuring
(there was a question of how to make it useful for Portable as
well as Quick). This CL does not address the Portable question,
but turns the optimization back on for Quick.
See b/9428200
Change-Id: I9f25b41219d7a243ec64efb18278e5a874766f4d
diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h
index 9c63d9c..342d2a2 100644
--- a/compiler/dex/mir_graph.h
+++ b/compiler/dex/mir_graph.h
@@ -509,6 +509,14 @@
return reg_location_[method_sreg_];
}
+ bool IsSpecialCase() {
+ return special_case_ != kNoHandler;
+ }
+
+ SpecialCaseHandler GetSpecialCase() {
+ return special_case_;
+ }
+
void BasicBlockCombine();
void CodeLayout();
void DumpCheckStats();
@@ -655,6 +663,7 @@
int method_sreg_;
unsigned int attributes_;
Checkstats* checkstats_;
+ SpecialCaseHandler special_case_;
ArenaAllocator* arena_;
};