Title: [114478] trunk/Source/_javascript_Core
Revision
114478
Author
[email protected]
Date
2012-04-17 20:54:34 -0700 (Tue, 17 Apr 2012)

Log Message

DFG should not attempt to get rare case counts for op_mod on ARM
https://bugs.webkit.org/show_bug.cgi?id=84218

Reviewed by Geoff Garen.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):
* dfg/DFGCommon.h:
(JSC::DFG::isX86):
(DFG):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (114477 => 114478)


--- trunk/Source/_javascript_Core/ChangeLog	2012-04-18 03:42:43 UTC (rev 114477)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-04-18 03:54:34 UTC (rev 114478)
@@ -1,3 +1,16 @@
+2012-04-17  Filip Pizlo  <[email protected]>
+
+        DFG should not attempt to get rare case counts for op_mod on ARM
+        https://bugs.webkit.org/show_bug.cgi?id=84218
+
+        Reviewed by Geoff Garen.
+
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::makeSafe):
+        * dfg/DFGCommon.h:
+        (JSC::DFG::isX86):
+        (DFG):
+
 2012-04-17  Myles Maxfield  <[email protected]>
 
         BumpPointerAllocator assumes page size is less than MINIMUM_BUMP_POOL_SIZE

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (114477 => 114478)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2012-04-18 03:42:43 UTC (rev 114477)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2012-04-18 03:54:34 UTC (rev 114478)
@@ -721,7 +721,15 @@
 
     NodeIndex makeSafe(NodeIndex nodeIndex)
     {
-        if (!m_inlineStackTop->m_profiledBlock->likelyToTakeSlowCase(m_currentIndex)
+        Node& node = m_graph[nodeIndex];
+        
+        bool likelyToTakeSlowCase;
+        if (!isX86() && node.op() == ArithMod)
+            likelyToTakeSlowCase = false;
+        else
+            likelyToTakeSlowCase = m_inlineStackTop->m_profiledBlock->likelyToTakeSlowCase(m_currentIndex);
+        
+        if (!likelyToTakeSlowCase
             && !m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, Overflow)
             && !m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, NegativeZero))
             return nodeIndex;
@@ -732,7 +740,7 @@
         case ArithSub:
         case ArithNegate:
         case ValueAdd:
-        case ArithMod: // for ArithMode "MayOverflow" means we tried to divide by zero, or we saw double.
+        case ArithMod: // for ArithMod "MayOverflow" means we tried to divide by zero, or we saw double.
             m_graph[nodeIndex].mergeFlags(NodeMayOverflow);
             break;
             

Modified: trunk/Source/_javascript_Core/dfg/DFGCommon.h (114477 => 114478)


--- trunk/Source/_javascript_Core/dfg/DFGCommon.h	2012-04-18 03:42:43 UTC (rev 114477)
+++ trunk/Source/_javascript_Core/dfg/DFGCommon.h	2012-04-18 03:54:34 UTC (rev 114478)
@@ -114,6 +114,15 @@
     }
 }
 
+inline bool isX86()
+{
+#if CPU(X86_64) || CPU(X86)
+    return true;
+#else
+    return false;
+#endif
+}
+
 } } // namespace JSC::DFG
 
 #endif // ENABLE(DFG_JIT)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to