commit | e4335eb5bcbca6927e51c10cf0de3516d94ef599 | [log] [tgz] |
---|---|---|
author | Mingyao Yang <mingyao@google.com> | Mon Mar 02 15:14:13 2015 -0800 |
committer | Mingyao Yang <mingyao@google.com> | Tue Mar 03 17:39:04 2015 -0800 |
tree | 3f69b4a17dc5d7ac5f6cab1ffee5a4091b5c9ba9 | |
parent | 5e42cd3eee2c89214a331a36fe226cfcc57917a3 [diff] [blame] |
Make BCE a no-op if there is no array access. Change-Id: I8456182808c1dbaa0c0ae1b8c2e94bb17baf5f29
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc index 4ca3648..1d16794 100644 --- a/compiler/optimizing/bounds_check_elimination.cc +++ b/compiler/optimizing/bounds_check_elimination.cc
@@ -944,6 +944,10 @@ }; void BoundsCheckElimination::Run() { + if (!graph_->HasArrayAccesses()) { + return; + } + BCEVisitor visitor(graph_); // Reverse post order guarantees a node's dominators are visited first. // We want to visit in the dominator-based order since if a value is known to