From 4d1be4920fefe2c1f7cb40357842c6587cdcc50e Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 6 Jan 2017 14:43:11 +0000 Subject: Remove the IsInDexCache flag from HLoadString. This flag was obsolete and always false. Test: m test-art-host Change-Id: Iabefc068908ff4f994b63e7e18a2a27c25a0919e --- compiler/optimizing/nodes.h | 16 ++-------------- compiler/optimizing/sharpening.cc | 1 - 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'compiler/optimizing') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index afa17cefa2..8c64d25aee 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -5762,7 +5762,6 @@ class HLoadString FINAL : public HInstruction { : HInstruction(SideEffectsForArchRuntimeCalls(), dex_pc), special_input_(HUserRecord(current_method)), string_index_(string_index) { - SetPackedFlag(false); SetPackedField(LoadKind::kDexCacheViaMethod); load_data_.dex_file_ = &dex_file; } @@ -5789,7 +5788,6 @@ class HLoadString FINAL : public HInstruction { const DexFile& GetDexFile() const; dex::StringIndex GetStringIndex() const { - DCHECK(HasStringReference(GetLoadKind()) || /* For slow paths. */ !IsInDexCache()); return string_index_; } @@ -5814,7 +5812,7 @@ class HLoadString FINAL : public HInstruction { load_kind == LoadKind::kJitTableAddress) { return false; } - return !IsInDexCache(); + return true; } bool NeedsDexCacheOfDeclaringClass() const OVERRIDE { @@ -5828,15 +5826,6 @@ class HLoadString FINAL : public HInstruction { return SideEffects::CanTriggerGC(); } - bool IsInDexCache() const { return GetPackedFlag(); } - - void MarkInDexCache() { - SetPackedFlag(true); - DCHECK(!NeedsEnvironment()); - RemoveEnvironment(); - SetSideEffects(SideEffects::None()); - } - void AddSpecialInput(HInstruction* special_input); using HInstruction::GetInputRecords; // Keep the const version visible. @@ -5852,8 +5841,7 @@ class HLoadString FINAL : public HInstruction { DECLARE_INSTRUCTION(LoadString); private: - static constexpr size_t kFlagIsInDexCache = kNumberOfGenericPackedBits; - static constexpr size_t kFieldLoadKind = kFlagIsInDexCache + 1; + static constexpr size_t kFieldLoadKind = kNumberOfGenericPackedBits; static constexpr size_t kFieldLoadKindSize = MinimumBitsToStore(static_cast(LoadKind::kLast)); static constexpr size_t kNumberOfLoadStringPackedBits = kFieldLoadKind + kFieldLoadKindSize; diff --git a/compiler/optimizing/sharpening.cc b/compiler/optimizing/sharpening.cc index 9fdeccfa1a..ca26c30dcf 100644 --- a/compiler/optimizing/sharpening.cc +++ b/compiler/optimizing/sharpening.cc @@ -270,7 +270,6 @@ void HSharpening::SharpenClass(HLoadClass* load_class, void HSharpening::ProcessLoadString(HLoadString* load_string) { DCHECK_EQ(load_string->GetLoadKind(), HLoadString::LoadKind::kDexCacheViaMethod); - DCHECK(!load_string->IsInDexCache()); const DexFile& dex_file = load_string->GetDexFile(); dex::StringIndex string_index = load_string->GetStringIndex(); -- cgit v1.2.3-59-g8ed1b