diff options
| author | 2017-02-07 13:06:06 -0800 | |
|---|---|---|
| committer | 2017-02-17 12:21:46 -0800 | |
| commit | 69d75ffac23fe1e655b7e81f0454c2841280dc1f (patch) | |
| tree | 88432364dd096bdd5674f48fb26e77f08cbf0dc6 /compiler/optimizing/nodes.cc | |
| parent | d8a16ba050978e4fe1447089002040a0047a5b3a (diff) | |
Skip loop optimization if there is no loop in the graph.
LinearizeGraph() does quite some allocations.
Also add some comments on the possible false positives of
some flags.
Test: m test-art-host
Change-Id: I80ef89a2dc031d601e7621d0b22060cd8c17fae3
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 71a26ebe79..62c89100eb 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -688,6 +688,7 @@ void HLoopInformation::Populate() { contains_irreducible_loop_ = true; graph->SetHasIrreducibleLoops(true); } + graph->SetHasLoops(true); } HBasicBlock* HLoopInformation::GetPreHeader() const { @@ -2032,9 +2033,19 @@ HInstruction* HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { } } outer_graph->UpdateMaximumNumberOfOutVRegs(GetMaximumNumberOfOutVRegs()); + if (HasBoundsChecks()) { outer_graph->SetHasBoundsChecks(true); } + if (HasLoops()) { + outer_graph->SetHasLoops(true); + } + if (HasIrreducibleLoops()) { + outer_graph->SetHasIrreducibleLoops(true); + } + if (HasTryCatch()) { + outer_graph->SetHasTryCatch(true); + } HInstruction* return_value = nullptr; if (GetBlocks().size() == 3) { |