diff options
| author | 2014-02-06 13:18:43 -0800 | |
|---|---|---|
| committer | 2014-02-13 14:00:16 -0800 | |
| commit | 3bc01748ef1c3e43361bdf520947a9d656658bf8 (patch) | |
| tree | 9ac4f9cfd8079f2e89c85986bb60205a6f3e7579 /compiler/dex/quick/codegen_util.cc | |
| parent | 68bb649b128cd8760732524bd7ba58b49780d9d3 (diff) | |
GenSpecialCase support for x86
Moved GenSpecialCase from being ARM specific to common code to allow
it to be used by x86 quick as well.
Change-Id: I728733e8f4c4da99af6091ef77e5c76ae0fee850
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
| -rw-r--r-- | compiler/dex/quick/codegen_util.cc | 14 |
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(); } |