Title: [153152] trunk/Source/_javascript_Core
- Revision
- 153152
- Author
- [email protected]
- Date
- 2013-07-24 20:59:55 -0700 (Wed, 24 Jul 2013)
Log Message
fourthTier: FTL should support Int32ToDouble
https://bugs.webkit.org/show_bug.cgi?id=115926
Reviewed by Mark Hahnenberg.
This node exists mainly to help the DFG see that a node may have both an int
and a double representation. But in the FTL, nodes already have multiple
representations. So this is just a no-op for the FTL.
I considered making it so that the node isn't even inserted if we're doing
FTL compilation, but that would have required a bunch of conditionalizing in
the DFG's optimization phases, which sort of expect this node to be present
and necessary.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble):
(LowerDFGToLLVM):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (153151 => 153152)
--- trunk/Source/_javascript_Core/ChangeLog 2013-07-25 03:59:53 UTC (rev 153151)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-07-25 03:59:55 UTC (rev 153152)
@@ -1,5 +1,28 @@
2013-05-10 Filip Pizlo <[email protected]>
+ fourthTier: FTL should support Int32ToDouble
+ https://bugs.webkit.org/show_bug.cgi?id=115926
+
+ Reviewed by Mark Hahnenberg.
+
+ This node exists mainly to help the DFG see that a node may have both an int
+ and a double representation. But in the FTL, nodes already have multiple
+ representations. So this is just a no-op for the FTL.
+
+ I considered making it so that the node isn't even inserted if we're doing
+ FTL compilation, but that would have required a bunch of conditionalizing in
+ the DFG's optimization phases, which sort of expect this node to be present
+ and necessary.
+
+ * ftl/FTLCapabilities.cpp:
+ (JSC::FTL::canCompile):
+ * ftl/FTLLowerDFGToLLVM.cpp:
+ (JSC::FTL::LowerDFGToLLVM::compileNode):
+ (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble):
+ (LowerDFGToLLVM):
+
+2013-05-10 Filip Pizlo <[email protected]>
+
fourthTier: FTL should support LogicalNot
https://bugs.webkit.org/show_bug.cgi?id=115924
Modified: trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp (153151 => 153152)
--- trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp 2013-07-25 03:59:53 UTC (rev 153151)
+++ trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp 2013-07-25 03:59:55 UTC (rev 153152)
@@ -99,6 +99,7 @@
case ArithMul:
case ArithNegate:
case UInt32ToNumber:
+ case Int32ToDouble:
// These are OK.
break;
case GetArrayLength:
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp (153151 => 153152)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp 2013-07-25 03:59:53 UTC (rev 153151)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp 2013-07-25 03:59:55 UTC (rev 153152)
@@ -325,6 +325,9 @@
case UInt32ToNumber:
compileUInt32ToNumber();
break;
+ case Int32ToDouble:
+ compileInt32ToDouble();
+ break;
case CheckStructure:
compileCheckStructure();
break;
@@ -748,6 +751,18 @@
m_int32Values.add(m_node, value);
}
+ void compileInt32ToDouble()
+ {
+ // This node is tricky to compile in the DFG backend because it tries to
+ // avoid converting child1 to a double in-place, as that would make subsequent
+ // int uses of of child1 fail. But the FTL needs no such special magic, since
+ // unlike the DFG backend, the FTL allows each node to have multiple
+ // contemporaneous low-level representations. So, this gives child1 a double
+ // representation and then forwards that representation to m_node.
+
+ m_doubleValues.add(m_node, lowDouble(m_node->child1()));
+ }
+
void compileCheckStructure()
{
LValue cell = lowCell(m_node->child1());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes