diff options
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index fb941b542f..4133cf676f 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -750,13 +750,16 @@ void HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { } } - // Finally, replace the invoke with the return value of the inlined graph. + // Replace the invoke with the return value of the inlined graph. if (last->IsReturn()) { invoke->ReplaceWith(last->InputAt(0)); body->RemoveInstruction(last); } else { DCHECK(last->IsReturnVoid()); } + + // Finally remove the invoke from the caller. + invoke->GetBlock()->RemoveInstruction(invoke); } } // namespace art |