summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2014-02-18 13:57:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-02-18 13:57:26 +0000
commit46861fccd9b5efb3226e2003310f01e748aec0a1 (patch)
treed144c4b504ff05f3819b50fed0ac4096fcb65927 /compiler/dex/quick/codegen_util.cc
parentb87fca834f1b5189f1f818b3849b6f0de1548ece (diff)
parent3bc01748ef1c3e43361bdf520947a9d656658bf8 (diff)
Merge "GenSpecialCase support for x86"
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index 05eb360a6b..c5dccda228 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -1017,19 +1017,13 @@ void Mir2Lir::Materialize() {
/* Allocate Registers using simple local allocation scheme */
SimpleRegAlloc();
- /*
- * Custom codegen for special cases. If for any reason the
- * special codegen doesn't succeed, first_lir_insn_ will be
- * set to NULL;
- */
- // TODO: Clean up GenSpecial() and return true only if special implementation is emitted.
- // Currently, GenSpecial() returns IsSpecial() but doesn't check after SpecialMIR2LIR().
+ /* First try the custom light codegen for special cases. */
DCHECK(cu_->compiler_driver->GetMethodInlinerMap() != nullptr);
- cu_->compiler_driver->GetMethodInlinerMap()->GetMethodInliner(cu_->dex_file)
+ bool special_worked = cu_->compiler_driver->GetMethodInlinerMap()->GetMethodInliner(cu_->dex_file)
->GenSpecial(this, cu_->method_idx);
- /* Convert MIR to LIR, etc. */
- if (first_lir_insn_ == NULL) {
+ /* Take normal path for converting MIR to LIR only if the special codegen did not succeed. */
+ if (special_worked == false) {
MethodMIR2LIR();
}