Bug 132139

Summary: Gtk build of FTL JIT on linux
Product: WebKit Reporter: Vahag <vaag>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, clopez, ossy, sanxiyn
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Linux   

Description Vahag 2014-04-24 12:43:30 PDT
Hi, I've been trying to enable FTL JIT for gtk build on Linux. 
I've managed to build JSC with FTL JIT enabled, however jsc fails run time at phase FTLCompile during the call of "llvm->GetPointerToGlobal" function.
Assertion fail happens in LLVM.
File: ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Assertion: assert(RealOffset <= INT32_MAX && RealOffset >= INT32_MIN)
Comment 1 Carlos Alberto Lopez Perez 2014-05-06 15:28:19 PDT
Check the bug https://bugs.webkit.org/show_bug.cgi?id=120270 for more information.
Comment 2 Seo Sanghyeon 2014-10-28 05:25:54 PDT
FYI, look at https://bugs.webkit.org/show_bug.cgi?id=133571 which points to https://github.com/pille5/llvm/commits/FTL_fixes_for_EFL for LLVM changes.

Vahag, "FDECFIEncoding = dwarf::DW_EH_PE_pcrel" bit in the patch will fix your assert problem.
Comment 3 Seo Sanghyeon 2014-10-29 03:27:05 PDT
There are two LLVM changes at https://github.com/pille5/llvm/commits/FTL_fixes_for_EFL

I found that the change related to stack map is upstream: http://llvm.org/viewvc/llvm-project?view=revision&revision=214538

The change related to exception frame encoding is not. I am not sure what is the best way to fix the problem, so I commented at http://llvm.org/bugs/show_bug.cgi?id=15356
Comment 4 Carlos Alberto Lopez Perez 2014-11-04 08:18:57 PST
I think this has been fixed on https://bugs.webkit.org/show_bug.cgi?id=138298
Comment 5 Csaba Osztrogonác 2014-12-07 03:43:21 PST
Patches in pille5 github repository already landed in LLVM, but not in latest
release. https://trac.webkit.org/changeset/176546 switched jhbuild LLVM module
to use 3.5 release and apply the 2 necessary patch.

If you build llvm with jhbuild (Tools/Scripts/update-webkitgtk-libs llvm),
and then build-webkit --ftl-jit, FTL-JIT works fine.
Comment 6 Csaba Osztrogonác 2015-11-23 04:36:24 PST
FTL JIT is built by default on GTK since https://trac.webkit.org/changeset/192469