Title: [161782] branches/jsCStack/Source/_javascript_Core
- Revision
- 161782
- Author
- fpi...@apple.com
- Date
- 2014-01-11 13:58:23 -0800 (Sat, 11 Jan 2014)
Log Message
Eliminate obviously redundant InvalidationPoints
https://bugs.webkit.org/show_bug.cgi?id=126825
Not yet reviewed.
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::invalidationPointElimination):
(JSC::DFG::CSEPhase::performNodeCSE):
Modified Paths
Diff
Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161781 => 161782)
--- branches/jsCStack/Source/_javascript_Core/ChangeLog 2014-01-11 21:03:15 UTC (rev 161781)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog 2014-01-11 21:58:23 UTC (rev 161782)
@@ -1,5 +1,16 @@
2014-01-11 Filip Pizlo <fpi...@apple.com>
+ Eliminate obviously redundant InvalidationPoints
+ https://bugs.webkit.org/show_bug.cgi?id=126825
+
+ Not yet reviewed.
+
+ * dfg/DFGCSEPhase.cpp:
+ (JSC::DFG::CSEPhase::invalidationPointElimination):
+ (JSC::DFG::CSEPhase::performNodeCSE):
+
+2014-01-11 Filip Pizlo <fpi...@apple.com>
+
Unreviewed, add a test for InvalidationPoint in the FTL.
Probably there are other tests that cover this in various ways and it's possible
Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGCSEPhase.cpp (161781 => 161782)
--- branches/jsCStack/Source/_javascript_Core/dfg/DFGCSEPhase.cpp 2014-01-11 21:03:15 UTC (rev 161781)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGCSEPhase.cpp 2014-01-11 21:58:23 UTC (rev 161782)
@@ -28,6 +28,8 @@
#if ENABLE(DFG_JIT)
+#include "DFGAbstractHeap.h"
+#include "DFGClobberize.h"
#include "DFGEdgeUsesStructure.h"
#include "DFGGraph.h"
#include "DFGPhase.h"
@@ -1005,6 +1007,18 @@
return result;
}
+ bool invalidationPointElimination()
+ {
+ for (unsigned i = m_indexInBlock; i--;) {
+ Node* node = m_currentBlock->at(i);
+ if (node->op() == InvalidationPoint)
+ return true;
+ if (writesOverlap(m_graph, node, Watchpoint_fire))
+ break;
+ }
+ return false;
+ }
+
void eliminateIrrelevantPhantomChildren(Node* node)
{
ASSERT(node->op() == Phantom);
@@ -1384,9 +1398,13 @@
eliminate(putByOffsetStoreElimination(m_graph.m_storageAccessData[node->storageAccessDataIndex()].identifierNumber, node->child1().node()));
break;
+ case InvalidationPoint:
+ if (invalidationPointElimination())
+ eliminate();
+ break;
+
case Phantom:
// FIXME: we ought to remove Phantom's that have no children.
-
eliminateIrrelevantPhantomChildren(node);
break;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes