diff options
author | 2015-04-21 16:21:32 +0000 | |
---|---|---|
committer | 2015-04-21 16:21:33 +0000 | |
commit | 0746453bdf87c4d76b646c5bdcea49b7cce0a47e (patch) | |
tree | 7841ad7f0afe7f5a3f422fd3f16d6c40e82f88d8 /compiler/optimizing/nodes.cc | |
parent | 4bb014fd8e0aa45b012d56bc4813f18fa295d2b0 (diff) | |
parent | 7d275379bf490a87805852129e3fe2e8afe961e7 (diff) |
Merge "ART: Update loop info of all nested loops when inlining"
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 5fca4fab22..4b9d4fc26b 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1064,8 +1064,10 @@ void HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { outer_graph->AddBlock(current); outer_graph->reverse_post_order_.Put(++index_of_at, current); if (info != nullptr) { - info->Add(current); current->SetLoopInformation(info); + for (HLoopInformationOutwardIterator loop_it(*at); !loop_it.Done(); loop_it.Advance()) { + loop_it.Current()->Add(current); + } } } } @@ -1075,8 +1077,10 @@ void HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { outer_graph->AddBlock(to); outer_graph->reverse_post_order_.Put(++index_of_at, to); if (info != nullptr) { - info->Add(to); to->SetLoopInformation(info); + for (HLoopInformationOutwardIterator loop_it(*at); !loop_it.Done(); loop_it.Advance()) { + loop_it.Current()->Add(to); + } if (info->IsBackEdge(*at)) { // Only `at` can become a back edge, as the inlined blocks // are predecessors of `at`. |