summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
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.