diff options
Diffstat (limited to 'compiler/dex/bb_optimizations.h')
-rw-r--r-- | compiler/dex/bb_optimizations.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler/dex/bb_optimizations.h b/compiler/dex/bb_optimizations.h index b948afd605..72919b6a9d 100644 --- a/compiler/dex/bb_optimizations.h +++ b/compiler/dex/bb_optimizations.h @@ -26,6 +26,30 @@ namespace art { /** + * @class String Change + * @brief Converts calls to String.<init> to StringFactory instead. + */ +class StringChange : public PassME { + public: + StringChange() : PassME("StringChange", kNoNodes) { + } + + void Start(PassDataHolder* data) const { + DCHECK(data != nullptr); + CompilationUnit* c_unit = down_cast<PassMEDataHolder*>(data)->c_unit; + DCHECK(c_unit != nullptr); + c_unit->mir_graph->StringChange(); + } + + bool Gate(const PassDataHolder* data) const { + DCHECK(data != nullptr); + CompilationUnit* c_unit = down_cast<const PassMEDataHolder*>(data)->c_unit; + DCHECK(c_unit != nullptr); + return c_unit->mir_graph->HasInvokes(); + } +}; + +/** * @class CacheFieldLoweringInfo * @brief Cache the lowering info for fields used by IGET/IPUT/SGET/SPUT insns. */ |