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)
Check the bug https://bugs.webkit.org/show_bug.cgi?id=120270 for more information.
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.
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
I think this has been fixed on https://bugs.webkit.org/show_bug.cgi?id=138298
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.
FTL JIT is built by default on GTK since https://trac.webkit.org/changeset/192469