From: bmeurer@chromium.org Date: Fri, 2 May 2014 05:59:07 +0000 (+0000) Subject: Drop obsolete HCheckMaps::HandleSideEffectsDominator(). X-Git-Tag: upstream/4.7.83~9303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7148380ccb881e8107f8b0c2596eca628ff69df;p=platform%2Fupstream%2Fv8.git Drop obsolete HCheckMaps::HandleSideEffectsDominator(). In HCheckMaps::HandleSideEffectsDominator() we try to remove redundant HCheckMaps instructions that are dominated by an HStoreNamedField instruction with a transition. This is just a special case of the check elimination and therefore obsolete (it also gives some nice speedup since GVN just got cheaper). R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/261003002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index 9e29ff7..59b43b6 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -1669,25 +1669,6 @@ void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) { } -bool HCheckMaps::HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator) { - ASSERT(side_effect == kMaps); - // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once - // type information is rich enough we should generalize this to any HType - // for which the map is known. - if (HasNoUses() && dominator->IsStoreNamedField()) { - HStoreNamedField* store = HStoreNamedField::cast(dominator); - if (!store->has_transition() || store->object() != value()) return false; - HConstant* transition = HConstant::cast(store->transition()); - if (map_set_.Contains(Unique::cast(transition->GetUnique()))) { - DeleteAndReplaceWith(NULL); - return true; - } - } - return false; -} - - void HCheckMaps::PrintDataTo(StringStream* stream) { value()->PrintNameTo(stream); stream->Add(" [%p", *map_set_.at(0).handle()); diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index 98b6fa2..c69a941 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -161,7 +161,6 @@ class LChunkBuilder; V(WrapReceiver) #define GVN_TRACKED_FLAG_LIST(V) \ - V(Maps) \ V(NewSpacePromotion) #define GVN_UNTRACKED_FLAG_LIST(V) \ @@ -177,6 +176,7 @@ class LChunkBuilder; V(ElementsPointer) \ V(GlobalVars) \ V(InobjectFields) \ + V(Maps) \ V(OsrEntries) \ V(ExternalMemory) \ V(StringChars) \ @@ -2762,8 +2762,6 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual bool HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator) V8_OVERRIDE; virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* value() { return OperandAt(0); } @@ -2813,7 +2811,6 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { SetOperandAt(1, typecheck != NULL ? typecheck : value); set_representation(Representation::Tagged()); SetFlag(kUseGVN); - SetFlag(kTrackSideEffectDominators); } bool omit_;