diff options
Diffstat (limited to 'compiler/optimizing/escape.cc')
-rw-r--r-- | compiler/optimizing/escape.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/escape.cc b/compiler/optimizing/escape.cc index f3f5b15d99..617833c697 100644 --- a/compiler/optimizing/escape.cc +++ b/compiler/optimizing/escape.cc @@ -41,6 +41,13 @@ void VisitEscapes(HInstruction* reference, EscapeVisitor& escape_visitor) { if (!escape_visitor(user)) { return; } + } else if (user->IsCheckCast() || user->IsInstanceOf()) { + // TODO Currently we'll just be conservative for Partial LSE and avoid + // optimizing check-cast things since we'd need to add blocks otherwise. + // Normally the simplifier should be able to just get rid of them + if (!escape_visitor(user)) { + return; + } } else if (user->IsPhi() || user->IsSelect() || (user->IsInvoke() && user->GetSideEffects().DoesAnyWrite()) || @@ -108,6 +115,9 @@ void CalculateEscape(HInstruction* reference, // Ignore already known inherent escapes and escapes client supplied // analysis knows is safe. Continue on. return true; + } else if (escape->IsInstanceOf() || escape->IsCheckCast()) { + // Ignore since these are not relevant for regular LSE. + return true; } else if (escape->IsReturn()) { // value is returned but might still be singleton. Continue on. *is_singleton_and_not_returned = false; |