WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
the patch
blah.patch (text/plain), 3.37 KB, created by
Filip Pizlo
on 2014-01-08 21:14:18 PST
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2014-01-08 21:14:18 PST
Size:
3.37 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 161544) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2014-01-08 Filip Pizlo <fpizlo@apple.com> >+ >+ FTL should be able to be parallel >+ https://bugs.webkit.org/show_bug.cgi?id=126679 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fix some bugs that got in the way of saying JSC_numberOfCompilerThreads=7 or some >+ such. >+ >+ * bytecode/CodeBlock.h: >+ (JSC::CodeBlock::livenessAnalysis): This wasn't thread-safe. Now it is. >+ * dfg/DFGWorklist.cpp: >+ (JSC::DFG::initializeGlobalWorklistOnce): FTL is now parallelizable. >+ * llvm/library/LLVMExports.cpp: >+ (initializeAndGetJSCLLVMAPI): Make LLVM parallelizable. >+ > 2014-01-08 Filip Pizlo <fpizlo@apple.com> > > FTL should not use the inputs of an add or sub as the live-at-exit values in an overflow check, if the values aren't live after >Index: Source/JavaScriptCore/bytecode/CodeBlock.h >=================================================================== >--- Source/JavaScriptCore/bytecode/CodeBlock.h (revision 161543) >+++ Source/JavaScriptCore/bytecode/CodeBlock.h (working copy) >@@ -695,9 +695,19 @@ public: > > BytecodeLivenessAnalysis& livenessAnalysis() > { >- if (!m_livenessAnalysis) >- m_livenessAnalysis = std::make_unique<BytecodeLivenessAnalysis>(this); >- return *m_livenessAnalysis; >+ { >+ ConcurrentJITLocker locker(m_lock); >+ if (!!m_livenessAnalysis) >+ return *m_livenessAnalysis; >+ } >+ std::unique_ptr<BytecodeLivenessAnalysis> analysis = >+ std::make_unique<BytecodeLivenessAnalysis>(this); >+ { >+ ConcurrentJITLocker locker(m_lock); >+ if (!m_livenessAnalysis) >+ m_livenessAnalysis = std::move(analysis); >+ return *m_livenessAnalysis; >+ } > } > > void validate(); >Index: Source/JavaScriptCore/dfg/DFGWorklist.cpp >=================================================================== >--- Source/JavaScriptCore/dfg/DFGWorklist.cpp (revision 161543) >+++ Source/JavaScriptCore/dfg/DFGWorklist.cpp (working copy) >@@ -266,14 +266,7 @@ static Worklist* theGlobalWorklist; > > static void initializeGlobalWorklistOnce() > { >- unsigned numberOfThreads; >- >- if (Options::useExperimentalFTL()) >- numberOfThreads = 1; // We don't yet use LLVM in a thread-safe way. >- else >- numberOfThreads = Options::numberOfCompilerThreads(); >- >- theGlobalWorklist = Worklist::create(numberOfThreads).leakRef(); >+ theGlobalWorklist = Worklist::create(Options::numberOfCompilerThreads()).leakRef(); > } > > Worklist* globalWorklist() >Index: Source/JavaScriptCore/llvm/library/LLVMExports.cpp >=================================================================== >--- Source/JavaScriptCore/llvm/library/LLVMExports.cpp (revision 161543) >+++ Source/JavaScriptCore/llvm/library/LLVMExports.cpp (working copy) >@@ -42,6 +42,10 @@ extern "C" JSC::LLVMAPI* initializeAndGe > g_llvmTrapCallback = callback; > > LLVMInstallFatalErrorHandler(llvmCrash); >+ >+ if (!LLVMStartMultithreaded()) >+ callback("Could not start LLVM multithreading"); >+ > LLVMLinkInMCJIT(); > LLVMInitializeNativeTarget(); > LLVMInitializeX86AsmPrinter();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
oliver
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 126679
: 220697