summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-08-19 19:02:45 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-08-19 19:02:45 +0000
commit83f8b5bb9e9c52791a02a84d7b0889cab898efe4 (patch)
tree59de59bcd9f166fd892df1887019c846abd539ba /compiler/optimizing/nodes.cc
parent99429ae0610e8d67d417542942c4befb35950bd3 (diff)
parentbbd733e4ef277eff19bf9a6601032da081e9b68f (diff)
Merge "ART: Enable basic optimizations for try/catch"
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 64c680c3fb..4332d7ed02 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -346,6 +346,16 @@ void HGraph::ComputeTryBlockInformation() {
}
}
+bool HGraph::HasTryCatch() const {
+ for (size_t i = 0, e = blocks_.Size(); i < e; ++i) {
+ HBasicBlock* block = blocks_.Get(i);
+ if (block != nullptr && (block->IsTryBlock() || block->IsCatchBlock())) {
+ return true;
+ }
+ }
+ return false;
+}
+
void HGraph::SimplifyCFG() {
// Simplify the CFG for future analysis, and code generation:
// (1): Split critical edges.