search for: lljit

Displaying 20 results from an estimated 80 matches for "lljit".

2020 Sep 04
2
Performance of JIT execution
...IT execution vs native code of the following simple logic which computes the Fibonacci sequence: uint64_t fib(int n) { if (n <= 2) { return 1; } else { return fib(n-1) + fib(n-2); } } When compiled natively using clang++ with -O3, it took 0.17s to compute fib(40). However, when executing using LLJIT, fed with the IR output of "clang++ -emit-llvm -O3", it took 0.26s. I don't know much about the internals of LLJIT, but my guess is since the IR is the same, maybe LLJIT used a cheaper but lower quality instruction selection pass, resulting in the slower runtime? Could someone workin...
2020 Aug 07
2
JIT interaction with linkonce_odr global variables
Hello, I recently hit an issue when JIT'ing my generated IR using llvm::orc::LLJIT. My IR contains the following definition of a global variable: > $_ZZ23TestStaticVarInFunctionbE1x = comdat any > @_ZZ23TestStaticVarInFunctionbE1x = linkonce_odr dso_local global i32 123, > comdat, align 4 > And in my host process, there exists the same symbol. I would expect LLJIT t...
2020 Nov 05
1
LLJIT global constants string becomes invalid in generated code
Hi, Recently I hit an issue that LLJIT crashes when CodeGenOpt::Less or higher is given. After investigation, it turned out that the issue is some global constant string in the IR, like > @.str.117 = private unnamed_addr constant [9 x i8] c"lineitem\00", align 1 > becomes an invalid pointer in the generated code. >...
2020 Oct 05
2
LLJIT: __{math}_finite symbols not resolved ?
...ot;, non-JIT pipeline, which seem to have been fixed over time - a simple fix being recompiling the target app against the new glibc. - https://bugs.llvm.org/show_bug.cgi?id=44842 - https://github.com/cms-sw/cmssw/issues/24935 - https://github.com/google/filament/issues/2146 But when going through LLJIT (tested with LLVM-10 & LLVM-11, on ArchLinux, glibc-2.32) I still get Symbols not found: [ __log_finite, __exp2_finite ] when trying to materialize my code. What could be done for that ? "Recompiling" doesn't seem to fix anything in this case so it looks like LLJIT lacks t...
2020 Sep 28
2
LLVM Developers Meeting JIT BoF -- Request for Topics of Interest
Hi Geoff, We use LLJIT. Do addObjectFile() and StaticLibraryDefinitionGenerator work > for ELF objects? They do. :) I've not tested StaticLibraryDefinitionGenerator extensively on Linux. but we have a regression test checking basic usage. If you run into any trouble at all please file a bug and assign it to me....
2020 Jan 29
3
Question about LLVM LLJIT Compile time
Hi, We are using the new LLJIT class in our compiler. We have not been successful using the parallel JIT feature. When we tried it previously on multiple modules, our compile-time increased significantly. I don't know if we are using it incorrectly, or that we miss out on optimizations we get when running on a single merged...
2020 Oct 02
2
LLVM Developers Meeting JIT BoF -- Request for Topics of Interest
...provements. Everyone will benefit from compile time improvements, but JIT clients are likely to be extra sensitive to it. Have we identified any problem areas or redundancies that would be of interest to the broader LLVM community, and that we could solicit help in fixing. Possibly also related to LLJIT design - having LLJIT first generate > minimally optimized code and then, while that is in use, doing optimization > and optimized codegen concurrently, would be neat. It feels like that'd > fit well into LLJIT, given that it already provides things like > background compile threads...
2019 Dec 20
4
LLJIT vs. thread-local storage
I am in the process of porting our ORC code to ORC v2 and LLJIT. Now that I have worked around a problem getting global constructors to be called, everything seems to work unless a module declares a static thread-local variable. In that case I get a "JIT session error" saying that the symbol __ emutls_v.xyz was not found (substitute the mangled variab...
2020 Sep 24
2
ORC JIT - Can modules independently managed with one LLJIT instance? + problems with ExecutionSession.lookup
Hey Lang, I would be really happy to only have one LLJIT instance and using multiple JITDylibs. However… it seems like that I don’t know enough to use them. So I wonder… 1. When I add Module A to JITDylib A and Module B to JITDylib B – where will those look for undefined symbols? Will Module A for example: will it only search itself and the MainDylib...
2019 Dec 20
2
LLJIT vs. thread-local storage
...rrent status now. What platform > you are on? > CC'ed (Lang hames) he knows exactly what is the status. > > On Fri, 20 Dec 2019 at 18:39, Geoff Levner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> I am in the process of porting our ORC code to ORC v2 and LLJIT. Now that >> I have worked around a problem getting global constructors to be called, >> everything seems to work unless a module declares a static thread-local >> variable. In that case I get a "JIT session error" saying that the symbol __ >> emutls_v.xyz was not...
2020 Oct 05
2
LLJIT: __{math}_finite symbols not resolved ?
...over time - a simple fix >> being recompiling the target app against the new glibc. >> - https://bugs.llvm.org/show_bug.cgi?id=44842 >> - https://github.com/cms-sw/cmssw/issues/24935 >> - https://github.com/google/filament/issues/2146 >> >> But when going through LLJIT (tested with LLVM-10 & LLVM-11, on >> ArchLinux, glibc-2.32) I still get >> >> Symbols not found: [ __log_finite, __exp2_finite ] >> >> when trying to materialize my code. >> >> What could be done for that ? "Recompiling" doesn't seem...
2020 Sep 28
2
LLVM Developers Meeting JIT BoF -- Request for Topics of Interest
Hi Geoff, Importing symbols into the JIT from an object file or static library...? Sure! Are you interested in doing this with the C API, LLJIT, or raw OrcV2 components? The high-level answer here (which we can dig into further in the BoF) is: For object files: - For raw OrcV2 components you'll want to create an RTDyldObjectLinkingLayer or ObjectLinkingLayer and use the 'add' method. - For an LLJIT instance you can just call...
2020 Sep 28
3
LLVM Developers Meeting JIT BoF -- Request for Topics of Interest
Hi, I would like to discuss the future/potential use-cases of LLVM JIT. I'm also interested in reducing the compilation time of code in JIT component independent of static compiler. Is it sounds interesting? :) On Sat, 26 Sep 2020 at 07:49, Andres Freund <andres at anarazel.de> wrote: > Hi, > > On 2020-09-25 19:05:42 -0700, Lang Hames wrote: > > The 2020 Virtual LLVM
2020 Oct 02
2
LLVM Developers Meeting JIT BoF -- Request for Topics of Interest
Hi Geoff, I have only encountered one problem. If a static library has not been > compiled with -fPIC and uses symbols from a shared library, LLJIT does not > complain, but the code may crash without warning when it is executed. Was the static library compiled with large code model too? I think this is probably a RuntimeDyld bug: It's not great at error reporting. A few people in the community are working on an ELF/x86-64 implementat...
2019 Dec 20
2
LLJIT vs. thread-local storage
...>>> CC'ed (Lang hames) he knows exactly what is the status. >>> >>> On Fri, 20 Dec 2019 at 18:39, Geoff Levner via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >>>> I am in the process of porting our ORC code to ORC v2 and LLJIT. Now >>>> that I have worked around a problem getting global constructors to be >>>> called, everything seems to work unless a module declares a static >>>> thread-local variable. In that case I get a "JIT session error" saying that >>>> the...
2019 Dec 20
3
LLJIT vs. thread-local storage
...19 at 12:36 PM David Blaikie via llvm-dev < llvm-dev at lists.llvm.org> wrote: > +Lang for visibility > > On Fri, Dec 20, 2019 at 5:09 AM Geoff Levner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> I am in the process of porting our ORC code to ORC v2 and LLJIT. Now that >> I have worked around a problem getting global constructors to be called, >> everything seems to work unless a module declares a static thread-local >> variable. In that case I get a "JIT session error" saying that the symbol __ >> emutls_v.xyz was not...
2019 Dec 19
2
Moving to ORCv2 - Where are my global constructors and destructors?
Heyho, Recently I tried out the ORCv2 JIT, especially the LLJIT. I gotta say, that I really like the new interface and the way you use it! However there is one thing I'm missing. I wrote a small bit code file, which should force having a global constructor. int wuff(); __declspec(noinline) int miau() { printf("Huhuhu"); return wuff...
2019 Dec 19
2
Moving to ORCv2 - Compiling debuggable code?
I too am in the process of porting our ORC code to ORC v2 and LLJIT. The new API allows me to remove much of our own code, which can only be a good thing. I sometimes get crashes, however, when executing my JIT compiled function, so I thought I would use gdb to try to figure out what is going wrong. And I am dismayed to see that there seems to be no way to provide...
2020 Oct 05
2
LLJIT: __{math}_finite symbols not resolved ?
Hello, here is a repro which runs in a docker image. https://we.tl/t-O1EhIAOeOF To see the issue, run repro.sh It will first download a (big, sorry) centos:7 docker image with my build of LLVM-11 and build a simple lljit-based example. This example is called with some trivial .cpp which calls `cos`. When ran from *within the container* it works. When the same example, with the same bitcode input, runs from outside the container, it does not find this symbol, likely because the host (in my case Arch, I think you ne...
2019 Dec 20
2
LLJIT vs. thread-local storage
...knows exactly what is the status. >>>>> >>>>> On Fri, 20 Dec 2019 at 18:39, Geoff Levner via llvm-dev < >>>>> llvm-dev at lists.llvm.org> wrote: >>>>> >>>>>> I am in the process of porting our ORC code to ORC v2 and LLJIT. Now >>>>>> that I have worked around a problem getting global constructors to be >>>>>> called, everything seems to work unless a module declares a static >>>>>> thread-local variable. In that case I get a "JIT session error" saying t...