diff options
| author | 2014-11-24 14:09:46 +0000 | |
|---|---|---|
| committer | 2014-11-24 14:40:22 +0000 | |
| commit | 26e7d454b9924f3673b075b05e4c604ad658a062 (patch) | |
| tree | 6cfc018247661e298137cb0985b6ce7c7fb400a6 /compiler/dex/mir_graph.cc | |
| parent | c2155048075b4916536f3aa23a88cd483b0f64a2 (diff) | |
Eliminate suspend checks on back-edges to return insn.
This optimization seems to have been broken for a long time.
Change-Id: I62ec85c71bb5253917ad9465a952911e917f6b52
Diffstat (limited to 'compiler/dex/mir_graph.cc')
| -rw-r--r-- | compiler/dex/mir_graph.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc index 8190f95275..3d85a4b86b 100644 --- a/compiler/dex/mir_graph.cc +++ b/compiler/dex/mir_graph.cc @@ -1167,6 +1167,14 @@ bool BasicBlock::RemoveMIRList(MIR* first_list_mir, MIR* last_list_mir) { return true; } +MIR* BasicBlock::GetFirstNonPhiInsn() { + MIR* mir = first_mir_insn; + while (mir != nullptr && static_cast<int>(mir->dalvikInsn.opcode) == kMirOpPhi) { + mir = mir->next; + } + return mir; +} + MIR* BasicBlock::GetNextUnconditionalMir(MIRGraph* mir_graph, MIR* current) { MIR* next_mir = nullptr; |