Title: [147297] branches/dfgFourthTier/Source/_javascript_Core
Revision
147297
Author
[email protected]
Date
2013-03-31 21:20:29 -0700 (Sun, 31 Mar 2013)

Log Message

fourthTier: FTL JIT should support GetByVal on Int32 arrays
https://bugs.webkit.org/show_bug.cgi?id=113668

Reviewed by Sam Weinig.
        
It actually already supported this, but needed to be told that it did.
        
Also adds an option to enable LICM (loop-invariant code motion, i.e.
http://llvm.org/docs/Passes.html#licm-loop-invariant-code-motion). LICM
isn't doing me any good right now, but I guess I'll have to play with
it more. And this adds the ability to tweak the LLVM optimization level
from the command-line.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
* runtime/Options.h:
(JSC):

Modified Paths

Diff

Modified: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (147296 => 147297)


--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-04-01 03:52:11 UTC (rev 147296)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog	2013-04-01 04:20:29 UTC (rev 147297)
@@ -1,5 +1,29 @@
 2013-03-31  Filip Pizlo  <[email protected]>
 
+        fourthTier: FTL JIT should support GetByVal on Int32 arrays
+        https://bugs.webkit.org/show_bug.cgi?id=113668
+
+        Reviewed by Sam Weinig.
+        
+        It actually already supported this, but needed to be told that it did.
+        
+        Also adds an option to enable LICM (loop-invariant code motion, i.e.
+        http://llvm.org/docs/Passes.html#licm-loop-invariant-code-motion). LICM
+        isn't doing me any good right now, but I guess I'll have to play with
+        it more. And this adds the ability to tweak the LLVM optimization level
+        from the command-line.
+
+        * ftl/FTLCapabilities.cpp:
+        (JSC::FTL::canCompile):
+        * ftl/FTLCompile.cpp:
+        (JSC::FTL::compile):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
+        * runtime/Options.h:
+        (JSC):
+
+2013-03-31  Filip Pizlo  <[email protected]>
+
         fourthTier: FTL JIT should supply TBAA meta-data to LLVM
         https://bugs.webkit.org/show_bug.cgi?id=113656
 

Modified: branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCapabilities.cpp (147296 => 147297)


--- branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCapabilities.cpp	2013-04-01 03:52:11 UTC (rev 147296)
+++ branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCapabilities.cpp	2013-04-01 04:20:29 UTC (rev 147297)
@@ -101,6 +101,7 @@
                 break;
             case GetByVal:
                 switch (node->arrayMode().type()) {
+                case Array::Int32:
                 case Array::Contiguous:
                     break;
                 default:

Modified: branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCompile.cpp (147296 => 147297)


--- branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCompile.cpp	2013-04-01 03:52:11 UTC (rev 147296)
+++ branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLCompile.cpp	2013-04-01 04:20:29 UTC (rev 147297)
@@ -54,7 +54,7 @@
     LLVMExecutionEngineRef engine;
     char* error = 0;
     
-    if (LLVMCreateJITCompilerForModule(&engine, state.module, 2, &error)) {
+    if (LLVMCreateJITCompilerForModule(&engine, state.module, Options::llvmOptimizationLevel(), &error)) {
         dataLog("FATAL: Could not create LLVM execution engine: ", error, "\n");
         CRASH();
     }
@@ -64,6 +64,8 @@
     LLVMAddConstantPropagationPass(pass);
     LLVMAddInstructionCombiningPass(pass);
     LLVMAddPromoteMemoryToRegisterPass(pass);
+    if (Options::enableLLVMLICM())
+        LLVMAddLICMPass(pass);
     LLVMAddGVNPass(pass);
     LLVMAddCFGSimplificationPass(pass);
     LLVMRunPassManager(pass, state.module);

Modified: branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp (147296 => 147297)


--- branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp	2013-04-01 03:52:11 UTC (rev 147296)
+++ branches/dfgFourthTier/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp	2013-04-01 04:20:29 UTC (rev 147297)
@@ -602,6 +602,7 @@
         LValue storage = lowStorage(m_node->child3());
         
         switch (m_node->arrayMode().type()) {
+        case Array::Int32:
         case Array::Contiguous: {
             if (m_node->arrayMode().isInBounds()) {
                 speculate(

Modified: branches/dfgFourthTier/Source/_javascript_Core/runtime/Options.h (147296 => 147297)


--- branches/dfgFourthTier/Source/_javascript_Core/runtime/Options.h	2013-04-01 03:52:11 UTC (rev 147296)
+++ branches/dfgFourthTier/Source/_javascript_Core/runtime/Options.h	2013-04-01 04:20:29 UTC (rev 147297)
@@ -84,6 +84,8 @@
     \
     v(bool, useExperimentalFTL, false) \
     v(bool, useFTLTBAA, true) \
+    v(bool, enableLLVMLICM, true) \
+    v(unsigned, llvmOptimizationLevel, 2) \
     \
     v(bool, enableProfiler, false) \
     \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to