summaryrefslogtreecommitdiffstats
path: root/compiler/dex/mir_graph.cc
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2013-07-19 10:58:21 -0700
committerbuzbee <buzbee@google.com>2013-07-19 11:03:25 -0700
commit479f83c196d5a95e36196eac548dc6019e70a5be (patch)
tree60028690c0fefe64f919565b8cf846f2535e991a /compiler/dex/mir_graph.cc
parent6eb5288264d68276085855bd041fa74fbca6827c (diff)
downloadandroid_art-479f83c196d5a95e36196eac548dc6019e70a5be.tar.gz
android_art-479f83c196d5a95e36196eac548dc6019e70a5be.tar.bz2
android_art-479f83c196d5a95e36196eac548dc6019e70a5be.zip
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
Diffstat (limited to 'compiler/dex/mir_graph.cc')
-rw-r--r--compiler/dex/mir_graph.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc
index 90e68abad8..264604c355 100644
--- a/compiler/dex/mir_graph.cc
+++ b/compiler/dex/mir_graph.cc
@@ -107,6 +107,7 @@ MIRGraph::MIRGraph(CompilationUnit* cu, ArenaAllocator* arena)
method_sreg_(0),
attributes_(METHOD_IS_LEAF), // Start with leaf assumption, change on encountering invoke.
checkstats_(NULL),
+ special_case_(kNoHandler),
arena_(arena) {
try_block_addr_ = new (arena_) ArenaBitVector(arena_, 0, true /* expandable */);
}
@@ -590,9 +591,6 @@ void MIRGraph::InlineMethod(const DexFile::CodeItem* code_item, uint32_t access_
bool* dead_pattern =
static_cast<bool*>(arena_->NewMem(sizeof(bool) * num_patterns, true,
ArenaAllocator::kAllocMisc));
- SpecialCaseHandler special_case = kNoHandler;
- // FIXME - wire this up
- (void)special_case;
int pattern_pos = 0;
/* Parse all instructions and put them into containing basic blocks */
@@ -614,12 +612,12 @@ void MIRGraph::InlineMethod(const DexFile::CodeItem* code_item, uint32_t access_
/* Possible simple method? */
if (live_pattern) {
live_pattern = false;
- special_case = kNoHandler;
+ special_case_ = kNoHandler;
for (int i = 0; i < num_patterns; i++) {
if (!dead_pattern[i]) {
if (special_patterns[i].opcodes[pattern_pos] == opcode) {
live_pattern = true;
- special_case = special_patterns[i].handler_code;
+ special_case_ = special_patterns[i].handler_code;
} else {
dead_pattern[i] = true;
}