diff options
author | Andreas Gampe <agampe@google.com> | 2015-04-25 14:47:31 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-25 15:16:10 -0700 |
commit | 24d65cce84165c2c3b0e02e09cdb92479ee4e479 (patch) | |
tree | 2ec7af2f9315a283ba665696eaff47c1fcadb6a7 /compiler/dex/bb_optimizations.h | |
parent | 3d58dea2a9d82aed045908fd9ea68c41f3d1f63d (diff) | |
download | art-24d65cce84165c2c3b0e02e09cdb92479ee4e479.zip art-24d65cce84165c2c3b0e02e09cdb92479ee4e479.tar.gz art-24d65cce84165c2c3b0e02e09cdb92479ee4e479.tar.bz2 |
ART: Fix missing dependency between GVN and other passes
The GVN may be turned off completely, or skip running when the
method is too complex. Turn off DCE in that case.
The dependent cleanup pass is not an optimization pass, so can't be
turned off that way. Check whether the GVN skipped in the gate function.
A possible follow-up is proper dependencies between passes.
Change-Id: I5b7951ecd6c74ebbfa5b23726a3d2f3ea1a23a47
Diffstat (limited to 'compiler/dex/bb_optimizations.h')
-rw-r--r-- | compiler/dex/bb_optimizations.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/dex/bb_optimizations.h b/compiler/dex/bb_optimizations.h index eb87c29..b948afd 100644 --- a/compiler/dex/bb_optimizations.h +++ b/compiler/dex/bb_optimizations.h @@ -284,6 +284,9 @@ class GlobalValueNumberingCleanupPass : public PassME { : PassME("GVNCleanup", kNoNodes, "") { } + // Depends on GlobalValueNumbering, so implemented in cc file. + bool Gate(const PassDataHolder* data) const OVERRIDE; + void Start(PassDataHolder* data) const OVERRIDE { DCHECK(data != nullptr); CompilationUnit* c_unit = down_cast<const PassMEDataHolder*>(data)->c_unit; |