summaryrefslogtreecommitdiffstats
path: root/compiler/dex/mir_optimization.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2015-04-25 17:00:45 +0100
committerVladimir Marko <vmarko@google.com>2015-04-27 15:41:04 +0100
commitf725550c8df90f8ec07395d9be5177a4be591c12 (patch)
treebfecc5637c57f4593e0bd73c11ad7a8887f4f988 /compiler/dex/mir_optimization.cc
parenta0ee862288b702468f8c2b6d0ad0f1c61be0b483 (diff)
downloadart-f725550c8df90f8ec07395d9be5177a4be591c12.tar.gz
art-f725550c8df90f8ec07395d9be5177a4be591c12.tar.bz2
art-f725550c8df90f8ec07395d9be5177a4be591c12.zip
Quick: Avoid unnecessary GVN work in release builds.
In GVN's post-processing phase, compare LVNs only in debug builds as they should be equal anyway. Remove the Gate() from GVN cleanup pass and remove the DCHECK() from MIRGraph::GlobalValueNumberingCleanup() to make it a no-op if the GVN didn't run. Bug: 16398693 Change-Id: Ia4f1e7e3ecf12d0305966c86e0e7dbae61dab0b7
Diffstat (limited to 'compiler/dex/mir_optimization.cc')
-rw-r--r--compiler/dex/mir_optimization.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc
index 348260270..f7107c159 100644
--- a/compiler/dex/mir_optimization.cc
+++ b/compiler/dex/mir_optimization.cc
@@ -1451,13 +1451,13 @@ void MIRGraph::EliminateDeadCodeEnd() {
}
void MIRGraph::GlobalValueNumberingCleanup() {
+ // If the GVN didn't run, these pointers should be null and everything is effectively no-op.
delete temp_.gvn.dce;
temp_.gvn.dce = nullptr;
delete temp_.gvn.gvn;
temp_.gvn.gvn = nullptr;
temp_.gvn.ifield_ids = nullptr;
temp_.gvn.sfield_ids = nullptr;
- DCHECK(temp_scoped_alloc_ != nullptr);
temp_scoped_alloc_.reset();
}