From 7c0f2e55456c39f92f0136844ebf17b2bbcf9a97 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 18 Jan 2016 15:24:53 +0000 Subject: [PATCH] Do HFieldGet first to avoid explicit null check. Change-Id: If22f85d502e1dce428f8d341fcb64e27a886fb89 --- compiler/optimizing/inliner.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 293282edb..20c4f1f69 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -356,12 +356,12 @@ bool HInliner::TryInlineMonomorphicCall(HInvoke* invoke_instruction, compare, invoke_instruction->GetDexPc()); // TODO: Extend reference type propagation to understand the guard. if (cursor != nullptr) { - bb_cursor->InsertInstructionAfter(load_class, cursor); + bb_cursor->InsertInstructionAfter(field_get, cursor); } else { - bb_cursor->InsertInstructionBefore(load_class, bb_cursor->GetFirstInstruction()); + bb_cursor->InsertInstructionBefore(field_get, bb_cursor->GetFirstInstruction()); } - bb_cursor->InsertInstructionAfter(field_get, load_class); - bb_cursor->InsertInstructionAfter(compare, field_get); + bb_cursor->InsertInstructionAfter(load_class, field_get); + bb_cursor->InsertInstructionAfter(compare, load_class); bb_cursor->InsertInstructionAfter(deoptimize, compare); deoptimize->CopyEnvironmentFrom(invoke_instruction->GetEnvironment()); -- 2.11.0