Reviewers: Sven Panne,
Message:
Because fast! :-)
Description:
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).
Please review this at https://codereview.chromium.org/261003002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+1, -23 lines):
M src/hydrogen-instructions.h
M src/hydrogen-instructions.cc
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
9e29ff700fa37c0ada2dfe2b04fc238bd96ff374..59b43b6bc5510ff793f6980c2191c2e888f0688b
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<Map>::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());
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index
98b6fa217b094e400377ace9a51cbdc53f78ad2a..c69a94188e82ac541b1f80bdca312a92d485985b
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_;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.