summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Mingyao Yang <mingyao@google.com> 2017-02-17 21:53:42 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-02-17 21:53:43 +0000
commit0f44de8616000962b6ff45dbb50c0cdf34521707 (patch)
tree45d129227a8e5ddcfe64eaa6662e14af9ef97eff /compiler/optimizing/nodes.cc
parentee883219e329571b9e487b94dc6a675095d088bf (diff)
parent69d75ffac23fe1e655b7e81f0454c2841280dc1f (diff)
Merge "Skip loop optimization if there is no loop in the graph."
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc11
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) {